https://bugzilla.novell.com/show_bug.cgi?id=676362
https://bugzilla.novell.com/show_bug.cgi?id=676362#c0 Summary: Bitmap Clone does not format return image to requested PixelFormat Classification: Mono Product: Mono: Class Libraries Version: 2.10.x Platform: All OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: libgdiplus AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Created an attachment (id=417123) --> (http://bugzilla.novell.com/attachment.cgi?id=417123) Compile with "mcs -r:System.Drawing.dll GdipCloneBitmapAreaITestCase.cs" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 When a call is made into Bitmap.Clone in which the PixelFormat is specified, the newly cloned image will always return with the PixelFormat of the original image. Browsing the code I was able to track it down to a call in the libgdiplus library in the bitmap class. In the GdipCloneBitmapAreaI method it is making a call to gdip_bitmap_clone_data_rect on line 1089 to do all the heavy lifting but the documentation for this method declared that it maintains the PixelFormat. I recommend changing the code at this point, to what I have no idea, but I would imagine there are methods which convert the pixel format as well. Reproducible: Always Steps to Reproduce: 1.Compile attached program 2.Run the resultant executable 3.If the code outputs "Format8bppIndexed", then it failed Actual Results: The code outputs "Format8bppIndexed" every time. Expected Results: The code should output "Format24bppRgb" to show that it modified the pixel format. Please compile my test code with mcs -r:System.Drawing.dll GdipCloneBitmapAreaITestCase.cs. I tried this in .NET and it produced the expected output of Format24bppRgb. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
