Image Size and Scaling

Good Morning,

Earlier this year I embarked on building an App and I have been well supported on this journey with the community and also by a community member @TIMAI2, Thank you @TIMAI2 for all you support on this journey and honestly I wouldn't be where I am today without your endless support :handshake:

I have a question around images and scaling, below are my blocks (cheers TIMAI2), basically I take an image with my phone (Samsung J5) and then later down the line it uploads to google. I am trying to get to a position where the images are less than 1MB and of reasonable quality, I have adjusted the the dimensions and this does very little in terms of quality (the image size on these settings is around 200Kb), the images are somewhat hazy and I am guessing this could be a scaling issue although I cannot be for certain. Could anyone provide some guidance on this? I have noted that there is a scaling block but where this goes in the other blocks or the start point of the settings is where I am unclear.



Many Thanks,

GC1

For me, I am finding very little difference in image size or output using scale as opposed to resize.

My phone camera is 12MP and takes 4000x3000 pixel images (doh!). These can vary in size between a few kb (a dark "black" image) up to @ 8mb (a bright "white" image), thus making using the dimensions to return a target file size is quite difficult. If we take somewhere in the middle, and assume "average" file size will be @ 3.5mb I found that dimensions of 1600x1200 returned a file size of @ 175kB (both with resize and scale-CROP) and very little in loss of clarity / sharpness in the output image.

YMMV, and you may just have to play around with settings until you find a satisfactory output from your device. Resize in multiples of your camera pixel output and aspect ratio to avoid jaggies and distortion.

You also might want to try this extension, seems to do a good job:

Thanks @TIMAI2

Disabling the blocks I get 3.7MB file with dimension 4128 x 3096
Enabling the blocks and using these same values 4128 x 3096 I get 816.1KB file...

I am confused why this is, but the quality is suitable nonetheless.