GetCropUrl with ImageCropMode.Pad results in black bars on the sides
Hello everybody,
I have a problem with figuring out how the Image Crop modes work.
In our system users are allowes to upload any kind of images with varying aspect ratios and dimensions. I would like to generate thumbnails that are 800 (width) x 500 (height) px.
GetCropUrl with ImageCropMode.Pad results in black bars on the sides
Hello everybody,
I have a problem with figuring out how the Image Crop modes work.
In our system users are allowes to upload any kind of images with varying aspect ratios and dimensions. I would like to generate thumbnails that are 800 (width) x 500 (height) px.
To acieve this I use
The problem is that it results in black bars on the images that are in JPG format and do not match this aspect ratio.
Is it possible to change the color of the black bars to be white?
Hi Vaidas,
Yes you can like this:
Jeavon
Hey Jeavon,
Thank you very very much! Works like a charm now ;)
You're welcome!
Hola,
For future reference the image cropper in Umbraco uses ImageProcessor. You can find the documentation for the url API here
From there you will be able to see the full range of instructions that are supported.
Cheers
James
is working on a reply...