Frage

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

War es hilfreich?

Lösung

  • 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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top