Bug 2488

Summary: Rotating image 180� offsets it by 1 pixel
Product: cairo Reporter: Kristian Høgsberg <krh>
Component: image backendAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high CC: benjamin, bertram.felgenhauer, jwatt
Version: 0.9.3   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: PNG showing the problem
C code to generate the PNG
proposed pix for the problem
Similar patch for fb in xserver

Description Kristian Høgsberg 2005-02-07 09:02:31 UTC
See attached PNG.  The image surface consisting of the red square and the black
outline is rotated 180° and composited onto the target surface.  The black
outline marks the edge of the image.  The yellow square marks the area where the
black outline should be, but as can be seen from the PNG the black square is
offset 1 pixel down and to the right.  Part of the black outline is clipped
because of this.
Comment 1 Kristian Høgsberg 2005-02-07 09:03:27 UTC
Created attachment 1848 [details]
PNG showing the problem
Comment 2 Kristian Høgsberg 2005-02-07 09:03:59 UTC
Created attachment 1849 [details]
C code to generate the PNG
Comment 3 James Henstridge 2005-07-01 00:44:54 UTC
Are you sure you are rotating around the right axis? (i.e. not half a pixel out
in the X and Y direction?)
Comment 4 Carl Worth 2005-08-22 17:14:21 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Comment 5 Bertram Felgenhauer 2005-09-16 10:56:35 UTC
Created attachment 3296 [details] [review]
proposed pix for the problem

See also:
http://lists.freedesktop.org/archives/cairo/2005-September/005285.html

[pixman] Changelog:

2005-09-16  Bertram Felgenhauer  <int-e@gmx.de>

	Bug #2488

	* src/fbcompose.c (fbFetchSourcePict, fbFetchTransformed): use the
	center of the pixel as the sampling point for rendering.

	* src/fbcompose.c (fbFetchTransformed): give source image values
	maximim effect in the center of the corresponding pixel.
Comment 6 Kristian Høgsberg 2006-06-13 17:14:18 UTC
Patch comitted and test cases updated.  Thanks.
Comment 7 Kristian Høgsberg 2006-06-13 22:15:56 UTC
Link to git commit:

http://gitweb.freedesktop.org/?p=cairo;a=commit;h=b104a79502e2c01c508e40d83613ecfa001a2a4e
Comment 8 Kristian Høgsberg 2006-06-16 15:29:35 UTC
Created attachment 5946 [details] [review]
Similar patch for fb in xserver

The bug is also present in the x server, attached patch is a port of the pixman
patch to fb.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.