Why do I get a bigger file size after decreasing the image size?
This is the base file:
http://s23.postimg.org/chc1had17/from.png
its size is 100.2 kB
after the resize: 179.8 kB
resample: lanczos
if I choose the "nearest neighbour" resample option, then the file size is smaller, but there is a huge quality loss.
kinda strange for me
Bigger file size after png resize
Moderators: XnTriq, helmut, xnview
-
- Moderator & Librarian
- Posts: 6386
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Bigger file size after png resize
Which file format did you choose for the result/output, inezzz?
-
- XnThusiast
- Posts: 4172
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Bigger file size after png resize
Which file format and compression method... ?XnTriq wrote:Which file format did you choose for the result/output, inezzz?
If your aim is to reduce the file size of the image, reducing the colour depth to 256 and resaving as a PNG with max compression results in a 30KB image with no obvious loss of quality.
If you do need to resize the image, what pixel or percent values do you need to resize to?
Edit: Image deleted because 30KB PNG file size expanded to 242KB when uploaded -- uncompressed ??
-
- Posts: 3
- Joined: Fri Feb 21, 2014 2:43 pm
Re: Bigger file size after png resize
Thank you for the answers!
I left the "Format" at "as original". If I change it now to PNG, the compression level is at 6. It looks like even if I change the compression level to 9 it is only a small change in file size.
However, that color depth change makes a huge impact. This is a great trick! I see the quality loss at the top of the image, but still pretty good.
These are the results:
result size(this is the needed size): 580x600
PNG6: 179.8 kB
PNG9: 178.2 kB
PNG6+color256: 60.7 kB
PNG9+color256: 59.2 kB
How did you make that 30kB?
If you know any similar tricks to optimize the image size, please let me know
I left the "Format" at "as original". If I change it now to PNG, the compression level is at 6. It looks like even if I change the compression level to 9 it is only a small change in file size.
However, that color depth change makes a huge impact. This is a great trick! I see the quality loss at the top of the image, but still pretty good.
These are the results:
result size(this is the needed size): 580x600
PNG6: 179.8 kB
PNG9: 178.2 kB
PNG6+color256: 60.7 kB
PNG9+color256: 59.2 kB
How did you make that 30kB?
If you know any similar tricks to optimize the image size, please let me know
-
- XnThusiast
- Posts: 4172
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Bigger file size after png resize
That's my experience too, and the image properties for both images show the compression method as ZIP, but using a compression level of 9 presumably adds a small extra optimisation.inezzz wrote:If I now choose the PNG, the compression level is at 6. It looks like even if I change the compression level to 9 it is only a small change in file size.
Reducing the colour depth can often be effective for the type of image that is saved as a PNG, and it is actually possible to reduce to much less than 256 colour. But it probably wouldn't work well for a photo, although in any case the JPEG format only supports 24-bit and grayscale depths.inezzz wrote:That color depth change makes a huge impact ... I see the quality loss at the top of the image, but still pretty good.
I didn't notice the quality loss at the top of the image at a quick look, but I thought that the large black text looked better!
I actually used XnView Classic for my quick test: Image > Convert to Colours... > 256 and then saved as a PNG with level 9 compression.inezzz wrote:How did you make that 30kB?
The equivalent in XnConvert is Image > Change color depth (which seems a better name...) and you can see that it is possible to reduce the colour depth in steps down to as few as 8 colours, if necessary, so you could experiment with lower values if you wish.
I'll leave you to experiment with the 580x600 pixel image you need.
Last edited by cday on Fri Feb 21, 2014 5:37 pm, edited 1 time in total.
-
- Moderator & Librarian
- Posts: 6386
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Bigger file size after png resize
I've resized from.png with XnView/XnConvert (Lanczos) to 580×600 pixels and tried to reduce the file size of the resulting PNG (204'645 bytes) without reducing the color depth:
- Free online services
- 185'590 pngoptimizer.com
- 185'851 ezgif.com
- 186'288 smushit.com
- compresspng.com (media4x.com)
- dynamicdrive.com
- XnView forum
- 185'478 PngOptimizer (Freeware)
- 197'164 RIOT — Radical Image Optimization Tool
- 204'624 SuperPNG
You do not have the required permissions to view the files attached to this post.
-
- Posts: 3
- Joined: Fri Feb 21, 2014 2:43 pm
Re: Bigger file size after png resize
Hmm, I'm a bit confused! does this mean that somehow XnConvert is less effective than XnView? (unfortunately I use linux so I can't use the classic XnView)
(ty for the links)
(ty for the links)
-
- XnThusiast
- Posts: 4172
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Bigger file size after png resize
I don't think so if the optimum settings are used: I've now managed to use XnConvert to reduce your image to 256 colours and obtain the same 30KB file size as before:inezzz wrote: ... does this mean that somehow XnConvert is less effective than XnView?
I used the following XnConvert settings:
I'm not sure whether Dithering -- None and Filter -- None are actually the ideal settings but they give you a basis for any further tests you may wish to make.
Adding a Resize step seemed to increase the file size, which seems counter intuitive as the resulting image has smaller pixel dimensions, but possibly results from an increase in complexity in the image. Note that the 580 x 600 pixel size image you wish to create has a slightly different aspect ratio from your orignal image, and that selecting or not selecting 'Keep ratio' affects the image produced, so you may need to examine that. Edit: use 'not selected' to obtain the pixel dimensions entered.
Also note that the Resize step produces a 24-bit colour image, and so the reduction in colour depth to 256 colours must be the final step.
You do not have the required permissions to view the files attached to this post.
-
- Moderator & Librarian
- Posts: 6386
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
-
- XnThusiast
- Posts: 2005
- Joined: Tue Jul 17, 2007 1:17 am
- Location: France
Re: Bigger file size after png resize
hello, ... yes you can ... via WINE http://www.winehq.org/inezzz wrote:... (unfortunately I use linux so I can't use the classic XnView)...
... also ... You can also use from XnViewMP under: tools\export... png settings on the fly ("Auto refresh" ...to check the size on the fly) ... then use XnViewMP "Batch Convert" ... or XnConvert or NConvert
XnViewMP Linux X64 - Debian - X64