[cairo] problem with downscaling images and destination coordinate spaces
Vladimir Vukicevic
vladimir at pobox.com
Mon May 28 21:57:47 PDT 2007
The attached test shows a problem with downscaling image surfaces;
basically, it looks like the valid destination coordinate space shrinks
down to 32768 / (src_size / (1.0/scale_factor)). So with a 2048 pixel
wide source image, scaling down to 16 px wide, anything drawn at an x
point greater than 32768 / (2048 / 16) = 256 ends up being mangled.
The problem seems to be that pixman transformation matrices are 16.16
fixed; thus the scaled offsets end up overflowing. Any ideas what to do
about this? This seems much bigger issue than the previous 16.16 issue
with traps; people generally aren't rendering to targets bigger than
32kx32k (yet), but people do want to be able to downscale large source
images...
I think I can work around this on our end by downsampling to a separate
surface at 0,0 first, and then rendering, but a better fix would be helpful.
- Vlad
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: surface-pattern-big-scale-down.c
Url: http://cairographics.org/archives/cairo/attachments/20070529/11e23cf2/attachment.txt
More information about the cairo
mailing list