#GetCropUrl with ImageCropMode.Crop don't add mode=crop and don't crop

1 messages · Page 1 of 1 (latest)

stoic cliff
#

I'm on a fairly fresh V 13.0.3 with converted content from V7.
When making image urls with GetCropUrl passing ImageCropMode.Crop the images are still padded with black. No mode="crop" in the querystring.
Adding mode="crop" manually makes the image actually crop instead of pad.
Is this expected behavior? Am I missing something? Are my data bad?
I'm stumped.

gaunt prawn
#

Hi there! If I remember correctly, there is an additional setting that you need to set in the GetCropUrl before it will actually crop. I don't remember which setting exactly it was. useCropDimensions maybe?

stoic cliff
#

So this was me confusing ImageProcessor with ImageSharp. 🤦‍♂️
Don't ask...

quaint basin
stoic cliff
#

Cheers @quaint basin, but see my last comment. 🙈

minor dagger
#

the values are slightly changed in Imagesharp

stoic cliff
#

I noticed. 🤭

#

I presume mode=crop is default with imagesharp but wasn't with imageprocessor. There's reasons I thought I was using sharp but was actually using processor.
As mentioned, don't ask. 🤭