https://bugzilla.novell.com/show_bug.cgi?id=381169
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=381169#c1 Sebastien Pouliot <[EMAIL PROTECTED]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[EMAIL PROTECTED] AssignedTo|[email protected] |[EMAIL PROTECTED] Status|NEW |ASSIGNED --- Comment #1 from Sebastien Pouliot <[EMAIL PROTECTED]> 2008-04-18 06:45:21 MST --- The issue is not identical to the JPEG case as the libgdiplus PNG coded already reads the resolution from the bitmap. >From pngcodec.c: bitmap_data->image_flags |= ImageFlagsHasRealDPI; bitmap_data->dpi_horz = png_get_x_pixels_per_inch(png_ptr, info_ptr); bitmap_data->dpi_vert = png_get_y_pixels_per_inch(png_ptr, info_ptr); >From libpng web site: <quote>(Each of these returns 0 [signifying "unknown"] if the data is not present or if res_x is 0; res_x_and_y is 0 if res_x != res_y)</quote> Now it looks like (see sample code) that MS returns the screen resolution when the PNG file has none. using System; using System.Drawing; class Program { static void Main (string [] args) { using (Bitmap bmp = new Bitmap ("mono.png")) { Console.WriteLine (bmp.HorizontalResolution); Console.WriteLine (bmp.VerticalResolution); using (Graphics g = Graphics.FromImage (bmp)) { Console.WriteLine (g.DpiX); Console.WriteLine (g.DpiY); } } } } Under MS.NET 72.009 72.009 72.009 72.009 Under Mono 0 0 86 86 -- 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
