[Mono-bugs] [Bug 77181][Min] Changed - Graphics.DrawImage only uses InterpolationMode.NearestNeighbor
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jan 18 16:59:30 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=77181
--- shadow/77181 2006-09-03 10:41:34.000000000 -0400
+++ shadow/77181.tmp.406 2007-01-18 16:59:30.000000000 -0500
@@ -5,13 +5,13 @@
OS Details: FC2
Status: NEW
Resolution:
Severity: Unknown
Priority: Minor
Component: libgdiplus
-AssignedTo: jordi at ximian.com
+AssignedTo: sebastien at ximian.com
ReportedBy: email at peterandjessica.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
URL:
Cc: jordi at ximian.com,juraj at hotfeet.ch,rkumar at novell.com
Summary: Graphics.DrawImage only uses InterpolationMode.NearestNeighbor
@@ -100,6 +100,73 @@
f99256b772d0d97cb4372501e9b49d7e zedgraph_NearestNeighbor.png
------- Additional Comments From juraj at hotfeet.ch 2006-09-03 10:41 -------
Is there any progress on this bug? Is this a bug in libgdiplus or
cairo itself? Any hints and pointers appreciated.
+
+------- Additional Comments From sebastien at ximian.com 2007-01-18 16:59 -------
+With a small (source ordering) change I can get the (exact) same
+bitmap for Bicubic, Bilinear, Default, High, HighQualityBicubic and
+HighQualityBilinear and another identical bitmap for Low and
+NearestNeighbor (but different from the previous one).
+
+That didn't look very exciting until I looked into Cairo and pixman
+source code. Here's the mapping from GDI+ to Cairo to Pixman...
+
+InterpolationModeHighQuality
+InterpolationModeHighQualityBilinear
+InterpolationModeHighQualityBicubic
+ CAIRO_FILTER_BEST
+ PIXMAN_FILTER_BEST
+
+InterpolationModeNearestNeighbor
+ CAIRO_FILTER_NEAREST
+ PIXMAN_FILTER_NEAREST
+
+InterpolationModeBilinear
+ CAIRO_FILTER_BILINEAR
+ PIXMAN_FILTER_BILINEAR
+
+InterpolationModeBicubic
+ CAIRO_FILTER_GAUSSIAN (not implemented in Cairo)
+ PIXMAN_FILTER_BEST
+
+InterpolationModeLowQuality
+ CAIRO_FILTER_FAST
+ PIXMAN_FILTER_FAST
+
+InterpolationModeDefault
+ CAIRO_FILTER_GOOD
+ PIXMAN_FILTER_GOOD
+
+Now in Pixman source code, PIXMAN_FILTER_BILINEAR, PIXMAN_FILTER_GOOD
+and PIXMAN_FILTER_BEST are used a single time, in the same condition,
+in pixman source code. PIXMAN_FILTER_NEAREST and PIXMAN_FILTER_FAST
+are also present a single time for the same condition.
+
+So, in reverse it looks like
+PIXMAN_FILTER_BILINEAR
+ CAIRO_FILTER_BILINEAR
+ InterpolationModeBilinear
+PIXMAN_FILTER_GOOD
+ CAIRO_FILTER_GOOD
+ InterpolationModeDefault
+PIXMAN_FILTER_BEST
+ CAIRO_FILTER_BEST
+ InterpolationModeHighQuality
+ InterpolationModeHighQualityBilinear
+ InterpolationModeHighQualityBicubic
+ CAIRO_FILTER_GAUSSIAN
+ InterpolationModeBicubic
+
+PIXMAN_FILTER_NEAREST
+PIXMAN_FILTER_FAST
+ CAIRO_FILTER_FAST
+ InterpolationModeLowQuality
+ CAIRO_FILTER_NEAREST
+ InterpolationModeNearestNeighbor
+
+And the first and second block match exactly my results.
+
+I'll clean up and do more test before committing this to SVN. Let me
+know if there's something wrong with my logic before I close this.
More information about the mono-bugs
mailing list