[Bug 225258] New: pnmtopng use transparent every time
https://bugzilla.novell.com/show_bug.cgi?id=225258 Summary: pnmtopng use transparent every time Product: openSUSE 10.2 Version: RC 4 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: nadvornik@novell.com ReportedBy: mskibbe@novell.com QAContact: qa@suse.de if i type: # cat bla.pnm | pnmcrop -white | pnmtopng > bla.png i get bla.png which has transparent background (white => transparent). there is no way to turn off this function. man page: [...]If that color does not appear in the image, there will be no transparency.[...] i want this case and try # cat bla.pnm | pnmcrop -white | pnmtopng -transparent=rgb:f0/f0/f0 > bla.png pnmtopng: Unrecognized option: '-transparent=rgb:f0/f0/f0' man page: pnmtopng [-verbose] [-downscale] [-interlace] [-alpha=file] [-transparent=[=]color] [...] then i tried this: # cat bla.pnm | pnmcrop -white | pnmtopng -transparent rgb:f0/f0/f0 > bla.png and # cat bla.pnm | pnmcrop -white | pnmtopng -transparent "rgb:f0/f0/f0" > bla.png and # cat bla.pnm | pnmcrop -white | pnmtopng -transparent =red > bla.png every time i get a png which hase transparent background instead of a white background. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=225258 prusnak@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|nadvornik@novell.com |prusnak@novell.com Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=225258 ------- Comment #1 from prusnak@novell.com 2006-12-06 02:43 MST ------- (In reply to comment #0)
# cat bla.pnm | pnmcrop -white | pnmtopng > bla.png works for me (white is not replaced with transparent)
# cat bla.pnm | pnmcrop -white | pnmtopng -transparent=rgb:f0/f0/f0 > bla.png pnmtopng: Unrecognized option: '-transparent=rgb:f0/f0/f0'
man page: pnmtopng [-verbose] [-downscale] [-interlace] [-alpha=file] [-transparent=[=]color] [...]
yes, manpages use '=' between options and parameters, programs do not, that is confusing to users
then i tried this: # cat bla.pnm | pnmcrop -white | pnmtopng -transparent rgb:f0/f0/f0 > bla.png and # cat bla.pnm | pnmcrop -white | pnmtopng -transparent "rgb:f0/f0/f0" > bla.png and # cat bla.pnm | pnmcrop -white | pnmtopng -transparent =red > bla.png
every time i get a png which hase transparent background instead of a white background.
first and second one are good behaviors: man page: -transparent=color .. If the color you specify is not present in the image, pnmtopng selects instead the color in the image that is closest to the one you specify. ... but third one is not: man page: .. However, if you prefix your color specification with '=', only the exact color you specify will be transparent. I will focus on this one ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=225258 prusnak@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |prusnak@novell.com Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #2 from prusnak@novell.com 2006-12-06 08:29 MST ------- I looked at the code and there were some extra heuristics in palette handling. I removed them and it seems OK right now. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com