Question

I am processing images using the ImageResizer library. All of the images vary in size and I want to create normalized renditions of them. Say:

  • 40 x 40
  • 120 x 120
  • 400 x 400

etc...

So - when an image comes in that is 100 x 100 - how can I scale that image up so that I end up with 120 x 120 and 400 x 400?

Atm if the image is smaller than the resize dimensions it seems to leave the image alone

Was it helpful?

Solution

  • To upscale OR downscale the image (resulting in blurriness), use scale=both.
  • To upscale the canvas and leave the original photo at 1:1, use `scale=canvas1.
  • To upscale only, never downscaling, use scale=up.

Check out ImageResizer Basics for some visual examples.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top