Page 1 of 1

[Solved] Reduce PNG file size while retaining pixel size

Posted: Fri Apr 15, 2022 1:55 pm
by SpeedCameraReport
When saving a drawing as .png, what is the best way to obtain a smaller file size (from say 42Kb) while retaining the same pixel size (say 600x600)?

Obviously there may be some loss of resolution,
Thanks,
Dave.

Re: How to reduce file size while retaining pixel size (.png

Posted: Fri Apr 15, 2022 2:07 pm
by John_Ha
If you want to keep the same pixel count the only way is to reduce the colours from 24 bit to 8 bit, or even 4 bit or 2 bit. See the tutorial on images or save the PNG as a GIF which reduces it to 8 bit colours.

Why do want to do it? A 42kB image is tiny.

Re: How to reduce file size while retaining pixel size (.png

Posted: Fri Apr 15, 2022 2:44 pm
by SpeedCameraReport
Hi John Ha.
Reducing the colours seems worth trying, how do you "reduce the colours from 24 bit to 8 bit"? Can't seem to find the settings for that.
Thanks,
Dave.

Re: How to reduce file size while retaining pixel size (.png

Posted: Fri Apr 15, 2022 3:01 pm
by John_Ha
It's all in the Tutorial. See [Tutorial] Some useful hints on using images.

Re: How to reduce file size while retaining pixel size (.png

Posted: Fri Apr 15, 2022 3:04 pm
by SpeedCameraReport
Yes, I have read through it but couldn't find how to reduce the colours.
I'll look again ...

Re: How to reduce file size while retaining pixel size (.png

Posted: Fri Apr 15, 2022 3:16 pm
by John_Ha
7. Use 256 colour (8 bit) images instead of 16 million colour (24 bit) images if possible

In IrfanView go Image > Decrease colour depth.

If you have scanned an image of a page, the white background will be many different shades, all close to, but not exactly [255,255,255] or [128,128,128]. Use Replace colour and set a tolerance of 20 or more - this makes all the "almost white" exactly white. As the values are now all identical they will compress much more.

Re: How to reduce file size while retaining pixel size (.png

Posted: Fri Apr 15, 2022 3:41 pm
by SpeedCameraReport
I cannot find anywhere in Open office "Draw" to reduce colours and the tutorial recommends IrfanView as well.
Found that setting "Interlaced" off reduces file size. Doesn't seem to affect the image though.
Thanks.

Re: How to reduce file size while retaining pixel size (.png

Posted: Fri Apr 15, 2022 4:09 pm
by Zizi64
Reducing the colours seems worth trying, how do you "reduce the colours from 24 bit to 8 bit"? Can't seem to find the settings for that.
It is NOT an Apache Openoffice feature. You must use a third party pixelgraphic editor or manager software for this task - before you embed the image into an OpenOffice document.

Re: How to reduce file size while retaining pixel size (.png

Posted: Fri Apr 15, 2022 5:45 pm
by SpeedCameraReport
Thanks Zizi64, that'll explain why I couldn't find it ! ;-)

Re: [Solved] Reduce PNG file size while retaining pixel size

Posted: Mon Dec 30, 2024 8:45 am
by nehavilash
Hi everyone,
If you’re looking for an easy way to compress PNG images without losing quality, you can try third party online tools like this PNG Compressor. It’s free and works great for reducing file sizes while keeping the original resolution.