[Mono-bugs] [Bug 80693][Wis] Changed - Add 48bpp (and more) support

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jan 31 22:46:33 EST 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80693

--- shadow/80693	2007-01-31 18:35:12.000000000 -0500
+++ shadow/80693.tmp.24842	2007-01-31 22:46:33.000000000 -0500
@@ -1,23 +1,23 @@
 Bug#: 80693
 Product: Mono: Class Libraries
 Version: 1.2
 OS: unknown
 OS Details: 
-Status: NEW   
+Status: ASSIGNED   
 Resolution: 
 Severity: Unknown
 Priority: Wishlist
 Component: libgdiplus
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: mugenjouchan at gmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: Add 16bpp PNG support
+Summary: Add 48bpp (and more) support
 
 Description of Problem:
 
 If I load some pngs(seemingly all of those which are created by image
 magick convert), well, It looks horrible.
 sample file output:
@@ -54,6 +54,46 @@
 
 (*) The PNG codec wasn't updated, however you should have got an
 exception.
 
 ------- Additional Comments From mugenjouchan at gmail.com  2007-01-31 18:35 -------
 Well, thanks for the extremely fast answer :)
+
+------- Additional Comments From sebastien at ximian.com  2007-01-31 22:46 -------
+Simplified sample:
+
+using System;
+using System.Drawing;
+
+class Program {
+	static public void Main() {
+		string filename = "80693.png";
+		Bitmap bmp = new Bitmap(filename);
+		Console.WriteLine ("{0} {1}", bmp.RawFormat, bmp.PixelFormat);
+		bmp.Save("80693-out.png");
+	}
+}
+
+First thing I notice is that the saved image doesn't match
+(8bit/color) the original (16-bit/color).
+
+poupou at pollux:~/src/bugzilla> file 80693.png
+80693.png: PNG image data, 50 x 60, 16-bit/color RGB, non-interlaced
+poupou at pollux:~/src/bugzilla> file 80693-out.png
+80693-out.png: PNG image data, 50 x 60, 8-bit/color RGB, non-interlaced
+
+And looks bad. 
+
+Then I executed the code under MS, to see how it was loaded. It's
+loaded as a Format48bppRgb! 
+
+The original picture is 16bpp per channel, so 48bpp (and that would
+explain why the small picture has such a large file). Mono doesn't
+support this and, it looks like, MS has some problems too (*).
+
+Cairo doesn't support more than 32bpp so support for 48bpp (or more)
+won't be implemented soon. However I will (before closing this bug as
+WONTFIX) fix the codec to report an error (which will throw an
+exception in System.Drawing.dll).
+
+(*) For curiousity I opened the MS-generated file and it's not
+identical to the original (it's much darker).


More information about the mono-bugs mailing list