News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Quality differences between 2 different PNG settings

Started by hutch--, May 09, 2020, 09:51:25 PM

Previous topic - Next topic

hutch--

I have been testing PNG settings with the two following lines.

    invoke GdipBitmapConvertFormat,pclone,21808h,0,0,NULL,0   ; PixelFormat24bppRGB
    or
    invoke GdipBitmapConvertFormat,pclone,21005h,0,0,NULL,0  ; PixelFormat16bppRGB555

Even after a lot of testing I still cannot see any difference between the 24bpp and the 16bpp versions. The 5*5*5 version is a lot smaller and the quality looks just as good.

FORTRANS

Hi,

   Normal images, a bit "busy", will usually look very good
as 16-bit or 15-bit images.  If you want a worst case image
you should try a large smooth gradient from saturated to
black.  That will show some banding.  Mostly things like that
can show up in close-up images of smooth objects.  Others
may have another good example, but I find those to be rare.

Cheers,

Steve

Siekmanski

PixelFormat16bppRGB555          equ 21005h
PixelFormat16bppRGB565          equ 21006h

16 bit RGB565 will give a better quality than 16 bit RGB555, that's because our eyes are more sensitive for the green color.
Creative coders use backward thinking techniques as a strategy.

jj2007

Full colour PNG is an abuse of the format. Lossy JPG is much better for fotos. 256 colours should be enough for a PNG.

hutch--

I have yet to find a good reason to use PNG on normal images as JPG just does it better, I mainly use PNG files for transparency with toolbar strips and similar small images for buttons. I have done a lot of testing on the different formats and the 16 bit 5+5+5 format seems to be as good as the 24 bit version but much smaller. I tested the 5+6+5 version but it did not look any better and it was bigger.

Siekmanski

The only reason I can think of to use PNG is, when alpha channels are required.
Also color reduction for 2-256 color images with transparency and/or translucency is best done with PNG.
JPG does a much better job if you want opaque, small file size quality images, but it has no alpha channel support.
Creative coders use backward thinking techniques as a strategy.

mineiro

Jpeg is lossy while png is like a gif, lossless.
A photo as an example is better compressed by jpeg, but what you supose to see is what you supose to get.
With png what you see is what you get.
Not ever jpg is better than png,gif,bmp. An example; open an image editor and fullfill the area with a collor, save using both formats and compare. We know that RLE,dictionary compress better in this case and this is the point. If image have a lot of collors variations so jpeg can win because is not trustworthy.
Have a jpg format thats lossless but few use that.
So it depends on the image/data and not the format, also for compressors, some are better than others in certain cases.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

mineiro

Quote from: Siekmanski on May 10, 2020, 12:13:10 AM
that's because our eyes are more sensitive for the green color.
Some persons say that sun color is green; we look as yellow/orange because sky is blue.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

daydreamer

Quote from: mineiro on May 10, 2020, 08:18:20 AM
Jpeg is lossy while png is like a gif, lossless.
A photo as an example is better compressed by jpeg, but what you supose to see is what you supose to get.
With png what you see is what you get.
Not ever jpg is better than png,gif,bmp. An example; open an image editor and fullfill the area with a collor, save using both formats and compare. We know that RLE,dictionary compress better in this case and this is the point. If image have a lot of collors variations so jpeg can win because is not trustworthy.
Have a jpg format thats lossless but few use that.
So it depends on the image/data and not the format, also for compressors, some are better than others in certain cases.
but gif and PNG uses more modern dictionary compress,maybe combined with RLE so only RLE works in special cases
I learned the hard way jpgs lossy compression,when try raycasting on jpg map didnt work,because the pixels fluxuated between 252-255(original color 255) something when I examined it afterwards
one reason I am interested in RLE,is make a map in paint program and save in RLE and use the compressed RLE data directly in something like raycasting,might become faster to read in how many empty squares it is to a wall,than to scan many empty squares

fast animation is best place for lower level quality,because eyes doesnt spot very detailed things in motion

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

mineiro

hello sir daydreamer;
Yes, the same goes for mp3. A musician with good hearing can see that a certain musical note has been cut into a certain song.
I saw a video of a pianist who wanted to ask the subscribers if they could tell the difference between 438hz and 440hertz. In the comments everyone said no. It was the compression used on youtube that brought about this fact.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything