Add a subcommand to photo images to allow for rotation
of them. You can do this partially using code on the
Wiki, but it is slow (especially due to colour
reparsing, I believe) and can't handle the alpha
channel at all.
If somebody ends up doing this, make sure that all the real work of
rotation is done down in the platform layer. On Mac OS X, all we have to
do is rotate the Context before & after drawing and Quartz does a really
nice and fast job of the rotation. So even if you have code that you will
use for X11 & Windows, make sure we can plug in this implementation
on the Mac by pushing it to the platform later.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are two notions of rotation here. There is rotation
of the image for display (which you were referring to) and
rotation of the image for further manipulation (e.g. copying
of part of the rotated image to another image), which was
what I was thinking about when I wrote this FRQ.
For display of images on a canvas, having a rotation
argument would be really cool (and would of course use the
platform layer as you suggest, Jim) but for manipulation of
the data, the platform layer isn't very relevant as it
happens. IMHO, at least.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=169107
If somebody ends up doing this, make sure that all the real work of
rotation is done down in the platform layer. On Mac OS X, all we have to
do is rotate the Context before & after drawing and Quartz does a really
nice and fast job of the rotation. So even if you have code that you will
use for X11 & Windows, make sure we can plug in this implementation
on the Mac by pushing it to the platform later.
Logged In: YES
user_id=79902
There are two notions of rotation here. There is rotation
of the image for display (which you were referring to) and
rotation of the image for further manipulation (e.g. copying
of part of the rotated image to another image), which was
what I was thinking about when I wrote this FRQ.
For display of images on a canvas, having a rotation
argument would be really cool (and would of course use the
platform layer as you suggest, Jim) but for manipulation of
the data, the platform layer isn't very relevant as it
happens. IMHO, at least.