OK ... thread is 4 years old

nevertheless, didn't contain much clarification so far, not even corpus delicti was attached, so finally
answering
[img]optbig.png[/img]
This image gets
3 times BIGGER when resized
down by factor 2
Code: Select all
************************************************************
Lanczos resize paradox (smaller bitmap, bigger file) :
************************************************************
04A10BD8B75E4EA1E6DE4B685CCCF545
OPTBIG.PNG 17'892
F4338B9E08E97160148E3927A1816703
OPTSMALL.PNG 40'620
************************************************************
Truecolor 3x8bpp BMP :
BIG.BMP 720'054 1'338 colors 600x400
SMALL.BMP 180'054 707 colors 300x200
Obviously, the "small" BMP must be 4 times smaller
than the "big" one, except the 54 bytes of BMP header.
Saving as PNG using NCONVERT 5.00 (XNVIEW must give the
very same result since both contain the very same LIBPNG) :
BIG.PNG 23'028
SMALL.PNG 69'613 More than 3 times BIGGER !!!!!
Maximum lossless PNG optimization using PNGOUT and
DEFLOPT (OPTIPNG irrelevant here, lost against PNGOUT) :
OPTBIG.PNG 17'892
OPTSMALL.PNG 40'620 Still 2.27 times BIGGER !!!
Additionally we can see than an optimized PNG can be
1.7 times smaller than "standard" PNG.
************************************************************
Download: lanczos.zip
Why does the file size grow ? Because the image has "special" content, the FreeDOS fish at the top has >> 256 colours, while the ASM stuff below just 2, resizing rises the amount of colours below to 256 (all grey), so the lower part will compress badly and grow massively in size, while the negligibly small fish can't save too much
This is a special case however, and I deliberately brewed the image as-is to maximize the shock

, OTOH resizing down and saving as PNG using PNG optimizers is still the best way to reduce image size, resizing by factor 2 should reduce the file size by factor 4 in average.
> the PNG format allows lossy
NO, as already found out.
> And with the compression ratio similar to Zip according
Better than ZIP, because of the filters.
resizing gives no benefit at size there (KB) , this seems illogical.
- Any explanation, please
Maybe LibPNG of XNView was not very good at that time promoting the evil effect ... retest with PNGOUT is the first thing to do next time

There is indeed no WinZIP under my rock.