CropUp: Returning correct crops of too small images
Hey,
loving the CropUp tool and the simplicity in using it.
It seems the default behaviour of the cropper is not to try and cut crops when an image is smaller than a crop. While this is a good default, I'd rather the cropper tries to return the correct crop size even if the image is slightly pixelated. Ideally we'd always want the client to put up the correct size images but we can't guarantee that. I may be missing something simple.
I've been trying to working out what settings I need in the CropUp.
Take the following example:
Square Crop: 400px x 400px
Uploaded Image: 400 x 350px
URL 1:
/CropUp/squarecrop/media/120806/image.jpg
Returns: Original Sized image 400 x 350
URL 2:
/CropUp/squarecropZ/media/120806/image.jpg
Returns: Required Crop Size 400 x 400 (cuts a square portion of the image and upscales)
My code looks like the following:
CropUp.GetUrl(sourceImage.UmbracoFile, new ImageSizeArguments { CropAlias = "squarecrop" })
I've tried all the different CropMode enum (BestFit, Max, Min, Pad, Responsive) types but I can't get it to replicate URL 2 with the Z CropMode. The only way I can get it is to hardcode the URL rather than using the extension.
CropUp: Returning correct crops of too small images
Hey,
loving the CropUp tool and the simplicity in using it.
It seems the default behaviour of the cropper is not to try and cut crops when an image is smaller than a crop. While this is a good default, I'd rather the cropper tries to return the correct crop size even if the image is slightly pixelated. Ideally we'd always want the client to put up the correct size images but we can't guarantee that. I may be missing something simple.
I've been trying to working out what settings I need in the CropUp.
Take the following example:
Square Crop: 400px x 400px
Uploaded Image: 400 x 350px
URL 1:
is working on a reply...