Rotate and save JPEG images without compressing again
Sannyasin Sivakatirswami
katir at hindu.org
Tue Jun 3 17:40:02 EDT 2003
Does anyone know of a way to import a jpeg image and rotate that image
save the file without re-compression of the data, and also maintaining
the original file size?
Most of the photo manipulation tools we have on the mac (OSX):
Photoshop, iView, ImageReady can all do this. Unfortunately these tools
each have their draw backs for a production schedule wherein one is
trying to dispatch processing of anywhere between 15 and 70 incoming
hi-res digital photos from a camera in 10-15 minutes time. Here is
where a home made app in Rev really shines as you can pre-script all
the paths for moving, archiving, copying files and making deletions
etc. for your particular work flow context.
My only problem is with incoming images that were previously down
sized and compressed in ImageReady (under a batch process) . that need
to be rotate to an upright position.
The incoming image into my Rev process is only about 16 K... but
quality is pretty good even though it was compressed down to quality 35
JPEG compression in ImageReady
but if I rotate the image simply with
"set the angle of image "currentImage" to -90
## clockwise in this case
Then I'm stuck... exporting the image with Rev's onboard compression
quality of 100 will maintain the quality of the original incoming
(--even though this is still breaking the rule of "compress only
once!") but the image file size balloons back up to 70-80K... if I
start setting the image compression to anything less the photo is
completely degraded from the double compression.
set the angle of image "currentImage" to -90
set the jpegquality to 100
export image "currentImage" to URL ("binfile:"&tPath&".copy") as
JPEG
set the filename of image "currentImage" to ""
set the angle of image "currentImage" to 0
set the filename of image "currentImage" to (tPath&".copy")
The above is the only way I can see to re-save the rotated image... do
we have any other options?
If I go back to doing this in ImageReady it can increase the task time
by as much as 30 minutes, too much for a daily process that is only a
small increment of a larger work flow.
Sannyasin Sivakatirswami
Himalayan Academy Publications
at Kauai's Hindu Monastery
katir at hindu.org
www.HimalayanAcademy.com,
www.HinduismToday.com
www.Gurudeva.org
www.Hindu.org
More information about the use-livecode
mailing list