PNG files in Photoline
-
- Mitglied
- Beiträge: 29
- Registriert: Sa 11 Okt 2003 03:19
PNG files in Photoline
Have been working a lot lately with PNG files and have noticed some odd behavior. If I save a file in png format the size remains constant no matter how many colors I reduce it to. In graphic converter the same file size shortens dramatically when you reduce color. If you show save optoins and have it calculate the size you will see it stay the same while the gif estimate changes. Wierd
I'm using OSX 10.4.1
I'm using OSX 10.4.1
-
- Betatester
- Beiträge: 499
- Registriert: Di 19 Nov 2002 16:16
- Wohnort: Darmstadt/Puebla/Shanghai
-
- Mitglied
- Beiträge: 29
- Registriert: Sa 11 Okt 2003 03:19
I've tried it 3 ways with no change in file size.Michael Rök-Ramirez hat geschrieben:Hi Hangnail:
No problem in my windows version!
Dont you have a file size reduction either when selecting a different Palette or Reduction Method?
Does that happen just in "save as" mode or as well when you select "tool"-"color"-"reduce color"?
Regards
Michael
1. Reduced colors via the tools menu. This looks to be the same dialog box used if you save as and do options for PNG color reduction upon saving. If you bring up an existing PNG and start messing with the colors and have Photoline estimate file size you will notice the gif estimate change while the png estimate stay the same.
2. Reduce colors using save as but it's the same basic dialog box as number 1.
3. change layer type to grayscale via the convert layer type dialog
note that the calculated size matches the file size saved so I don't think its just an issue with the calculation.
If I do the same thing with graphic converter the file size almost halves. I'll keep poking ...
-
- Mitglied
- Beiträge: 29
- Registriert: Sa 11 Okt 2003 03:19
-
- Mitglied
- Beiträge: 29
- Registriert: Sa 11 Okt 2003 03:19
-
- Entwickler
- Beiträge: 4176
- Registriert: Di 19 Nov 2002 15:49
I just tried PL32 11.52 on Mac OS X 10.3.5 and I couldn't reproduce this problem.Hangnail hat geschrieben:Additional additional:
Got the file size to reduce but I had to convert the layer type to monochrome. If its 256, grayscale, or higher the file size remains unchanged. Is an alpha channel being saved? i figured taht was the different between an 8bit and 16bit grayscale. I'm using 8bit.
I did the following:
- I opened an RGB image
- File/Save as...
- Selected "PNG" in the File Format-List
- Pressed "File Size"
- Pressed "Options"
- Activated "Reduce Colors" (which hasn't been activated) and chose a reduction scheme (16 Colors, Best color)
- Left the Options with OK
- Pressed "File Size" and the resulting file size was much smaller
Do you do something different? Does the function "Web/Web Export" work?
Martin
-
- Mitglied
- Beiträge: 29
- Registriert: Sa 11 Okt 2003 03:19
Ok. Here are the results I started with a 16 million color PNG file
base file is png format and size is: ~5.3 meg
Graphic converter:
256 colors: ~3.7 meg
16 Colors: ~1.8 meg
2 Colors: ~500k
Photoline (using reduce colors on save - nearest color):
256 color: 5.8 meg
16 color: 5.8 meg
2 color 5.8 meg
Photoline (using reduce colors from color tools but not options on save):
Same as above
Photoline (using layer convert functions):
Grayscale: 5.8 meg
black and hite: 800k
Photoline (using web export)
256: 3.7 meg
16: 3.7 meg
2: Not available on web export
I hope I'm doing this right. I am using Tiger but I don't think that could be an issue (I could be wrong of course). I've done this several times to hopefully eliminate proceedural errors but i'm getting consistant behavior. Export seemed to give similar results to Graphic converter in the 256 range.
base file is png format and size is: ~5.3 meg
Graphic converter:
256 colors: ~3.7 meg
16 Colors: ~1.8 meg
2 Colors: ~500k
Photoline (using reduce colors on save - nearest color):
256 color: 5.8 meg
16 color: 5.8 meg
2 color 5.8 meg
Photoline (using reduce colors from color tools but not options on save):
Same as above
Photoline (using layer convert functions):
Grayscale: 5.8 meg
black and hite: 800k
Photoline (using web export)
256: 3.7 meg
16: 3.7 meg
2: Not available on web export
I hope I'm doing this right. I am using Tiger but I don't think that could be an issue (I could be wrong of course). I've done this several times to hopefully eliminate proceedural errors but i'm getting consistant behavior. Export seemed to give similar results to Graphic converter in the 256 range.
-
- Entwickler
- Beiträge: 4176
- Registriert: Di 19 Nov 2002 15:49
I don't think, the OS version is relevant for this problem.Hangnail hat geschrieben:Photoline (using web export)
256: 3.7 meg
16: 3.7 meg
2: Not available on web export
I hope I'm doing this right. I am using Tiger but I don't think that could be an issue (I could be wrong of course). I've done this several times to hopefully eliminate proceedural errors but i'm getting consistant behavior. Export seemed to give similar results to Graphic converter in the 256 range.
Because Web Export is the easiest way to export a PNG, we should concentrate on this one. Are there problems with other files, too, or just with this one? If you are changing the number of colors, do you see a corresponding change in the preview? If you are counting the number of colors of the resulting file, do you get the correct number?
Martin
-
- Mitglied
- Beiträge: 29
- Registriert: Sa 11 Okt 2003 03:19
The export seems to be good on the 'calculate' function. All other ways result in a file size the same as the original RGB file. Except when I convert the layer to black and white. Then the normal save function produces output similar to Graphic converter.
I usually work in JPEG and GIF and save work files in native PL32 format so this is the first time I've played with PNG.
I usually work in JPEG and GIF and save work files in native PL32 format so this is the first time I've played with PNG.
-
- Entwickler
- Beiträge: 4176
- Registriert: Di 19 Nov 2002 15:49
With "export" you mean the function "Web/Web Export"?Hangnail hat geschrieben:The export seems to be good on the 'calculate' function.
So in Web Export the calculated file sizes are reasonable?
Are the saved files correct, too?
If you reduce the number of colors manually by using "Tool/Color/Reduce Colors...", do you get a correct result? If you use "Tool/Color/Count Colors..." afterwards, do you get the correct number of colors?Hangnail hat geschrieben:All other ways result in a file size the same as the original RGB file. Except when I convert the layer to black and white. Then the normal save function produces output similar to Graphic converter.
Do you have problems just with a single file or is this a common problem?
Did you try a simple RGB image (no transparency, only one layer)?
I don't see any problems on my computer, so it is important, that you answer the questions above. Otherwise it is very hard for me to give you any advice.Hangnail hat geschrieben:I usually work in JPEG and GIF and save work files in native PL32 format so this is the first time I've played with PNG.
Martin
-
- Mitglied
- Beiträge: 29
- Registriert: Sa 11 Okt 2003 03:19
Before I answer I think I found a major clue. The images I've been working with are very high quality scans that are grayscale. However when I open them PL32 (and graphic converter) read the layer as RGB. When I change mode in graphic converter and save it reduces fine and when I use the web/webexport function in PL32 it also reduces fine. Only when I try to reduce colors using the the color reduction dialog box in either the colors tools menu or when I save do I not see any reduction in file size.
Now when I use a PNG image that is 24 bit COLOR to start with the reduction works fine no matter what application and method.
So I wonder if it is something in the file that is either confusing PL32 or a corruption that Graphic converter can deal with. I'll try to upload the file if you want to play but its pretty huge.
Ok use the link below if you want to play with the image I was talking about
http://mysite.verizon.net/hangnail/test/Berserk.png
The color count is about 191 but pl says its an RGB layer. Reducing colors on save won't reduce the file size unless you convert the one layer to black and white. I don't now if there is any hidden transparancy or apha channel. If you use the web/web export function it will reduce to the same size as if you changed mode in graphic converter to gray scale and saved the image normally.
For completeness I'll try to answer the questions you had below:
Sorry for being such a pain. I'm sure I probably am not doing something correctly
Now when I use a PNG image that is 24 bit COLOR to start with the reduction works fine no matter what application and method.
So I wonder if it is something in the file that is either confusing PL32 or a corruption that Graphic converter can deal with. I'll try to upload the file if you want to play but its pretty huge.
Ok use the link below if you want to play with the image I was talking about
http://mysite.verizon.net/hangnail/test/Berserk.png
The color count is about 191 but pl says its an RGB layer. Reducing colors on save won't reduce the file size unless you convert the one layer to black and white. I don't now if there is any hidden transparancy or apha channel. If you use the web/web export function it will reduce to the same size as if you changed mode in graphic converter to gray scale and saved the image normally.
For completeness I'll try to answer the questions you had below:
Yes. Web export worked as I expected and produced an image of the same size as graphic converter did.Martin Huber hat geschrieben: With "export" you mean the function "Web/Web Export"?
So in Web Export the calculated file sizes are reasonable?
Are the saved files correct, too?
This is where I started seeing what probably might be the problem. The scans count around 191 or so colors which is less than 256 shades of grey. Photoline reads it as RGB (so does graphic converter)Martin Huber hat geschrieben:If you reduce the number of colors manually by using "Tool/Color/Reduce Colors...", do you get a c
orrect result? If you use "Tool/Color/Count Colors..." afterwards, do you get the correct number of colors?
Seems to be these files as (mentioned above) I had no issue with a real color 24 bit png.Martin Huber hat geschrieben:Do you have problems just with a single file or is this a common problem?
Yea ... worked fine.Martin Huber hat geschrieben:Did you try a simple RGB image (no transparency, only one layer)?
Sorry for being such a pain. I'm sure I probably am not doing something correctly
-
- Entwickler
- Beiträge: 4176
- Registriert: Di 19 Nov 2002 15:49
I played around with this file quite a while and got the following results:Hangnail hat geschrieben:Before I answer I think I found a major clue. The images I've been working with are very high quality scans that are grayscale. However when I open them PL32 (and graphic converter) read the layer as RGB. When I change mode in graphic converter and save it reduces fine and when I use the web/webexport function in PL32 it also reduces fine. Only when I try to reduce colors using the the color reduction dialog box in either the colors tools menu or when I save do I not see any reduction in file size.
Now when I use a PNG image that is 24 bit COLOR to start with the reduction works fine no matter what application and method.
So I wonder if it is something in the file that is either confusing PL32 or a corruption that Graphic converter can deal with. I'll try to upload the file if you want to play but its pretty huge.
Ok use the link below if you want to play with the image I was talking about
http://mysite.verizon.net/hangnail/test/Berserk.png
The color count is about 191 but pl says its an RGB layer. Reducing colors on save won't reduce the file size unless you convert the one layer to black and white. I don't now if there is any hidden transparancy or apha channel. If you use the web/web export function it will reduce to the same size as if you changed mode in graphic converter to gray scale and saved the image normally.
- the file is opened as RGB layer because it is a palette image
- PL32 11.52 tells me, that the file has 256 colors
- Web Export of PL32 11.52 gives me the following file sizes (all results are median cut, best color):
256 colors: ~1 MByte
64 colors: ~1 MByte
16 colors: ~690 kByte
4 colors: ~320 kByte
The values of 256 and 64 colors are the same, because color reduction in RGB
works with a lower precision in order to reduce memory consumption and to increase speed. This has no negative effects on real photos but does affect RGB images, that are gray images in reality. We will change this in one of the future versions.
- If I use "Save As..." I get the same results with one exception:
256 colors: 1.35 MByte
This is different because the effect described above doesn't happen with "Save As..." because of an internal optimization.
Do you use version 11.52? Previous versions had a bug, that displayed the wrong file size in the "Save As..." under certain circumstances.
There is no need to apologize.Hangnail hat geschrieben:Sorry for being such a pain. I'm sure I probably am not doing something correctly
This forum exists for asking questions and if there are problems in PL32, we are definitely interested in knowing them.
Martin
-
- Mitglied
- Beiträge: 29
- Registriert: Sa 11 Okt 2003 03:19
-
- Entwickler
- Beiträge: 4176
- Registriert: Di 19 Nov 2002 15:49