Sign in with
Sign up | Sign in
Your question

rotating JPG's, Windows explorer context menu, ImageMagick..

Last response: in Digital Camera
Share
Anonymous
December 7, 2004 12:20:17 PM

Archived from groups: rec.photo.digital (More info?)

Howdy,

Windows XP has a context menu Rotate Left and Rotate Right commands in
the Explorer context menu for jpeg's (the context menu is the you see
when you right click on a JPG file in Windows explorer).

That's mighty darned handy. Unfortunately, Microsoft's version of
that in XP results in smaller files as well as a noticeable loss in
image quality in the process, likely due to using a default low JPEG
quality factor in the conversion, and further unfortunately, it does
me no good in Windows 2000.

What I'd like to do is create my own Context menu entries RotateLeft
and RotateRight for the JPG file type, leveraging the ImageMagick
command line program convert, in this way:

convert -rotate 90 -quality 95 %1 %1_rot.JPG

Unfortunately, I'm running into some issues debugging the entry I've
made in Explorer's Tools>Folder Options>File Types>JPG>Advanced New
actions dialog box despite having added the appropriate cygwin
directories to my path.

I thought I'd throw the question out with the confidence that some has
had to have done this before.... It seems to do it right, a batch
file will be involved, and will need some fancier batch file
constructs than I've used in the past.

Anyone invented this wheel already? Googling has yielded no fruit for
me thus far, and I'd appreciate any help to get me into the endzone on
this one! :-\

Best Regards,
--
Todd H.
http://www.toddh.net/
Anonymous
December 7, 2004 6:00:26 PM

Archived from groups: rec.photo.digital (More info?)

Try hunting down a utility called "cPicture". I'm pretty sure it's
freeware, and it states that its rotation function is lossless. I don't
know about automating the process.

(I've used it and I don't doubt that it's lossless, but of course I'm
not enough of an expert to say with certainty.)

Todd H. wrote:
> Howdy,
>
> Windows XP has a context menu Rotate Left and Rotate Right commands in
> the Explorer context menu for jpeg's (the context menu is the you see
> when you right click on a JPG file in Windows explorer).
>
> That's mighty darned handy. Unfortunately, Microsoft's version of
> that in XP results in smaller files as well as a noticeable loss in
> image quality in the process, likely due to using a default low JPEG
> quality factor in the conversion, and further unfortunately, it does
> me no good in Windows 2000.
>
> What I'd like to do is create my own Context menu entries RotateLeft
> and RotateRight for the JPG file type, leveraging the ImageMagick
> command line program convert, in this way:
>
> convert -rotate 90 -quality 95 %1 %1_rot.JPG
>
> Unfortunately, I'm running into some issues debugging the entry I've
> made in Explorer's Tools>Folder Options>File Types>JPG>Advanced New
> actions dialog box despite having added the appropriate cygwin
> directories to my path.
>
> I thought I'd throw the question out with the confidence that some has
> had to have done this before.... It seems to do it right, a batch
> file will be involved, and will need some fancier batch file
> constructs than I've used in the past.
>
> Anyone invented this wheel already? Googling has yielded no fruit for
> me thus far, and I'd appreciate any help to get me into the endzone on
> this one! :-\
>
> Best Regards,
> --
> Todd H.
> http://www.toddh.net/
December 8, 2004 3:52:03 AM

Archived from groups: rec.photo.digital (More info?)

"Todd H." <t@toddh.net> wrote in message news:m04qiy9lu6.fsf@ripco.com...
>
> Howdy,
>
> Windows XP has a context menu Rotate Left and Rotate Right commands in
> the Explorer context menu for jpeg's (the context menu is the you see
> when you right click on a JPG file in Windows explorer).
>
> That's mighty darned handy. Unfortunately, Microsoft's version of
> that in XP results in smaller files as well as a noticeable loss in
> image quality in the process, likely due to using a default low JPEG
> quality factor in the conversion, and further unfortunately, it does
> me no good in Windows 2000.

This thread indicated xp jpg rotation was lossless with some evidence to
back it up. Some talk of it only being lossless for resolutions that are
multiples of 16 though.

http://groups-beta.google.com/group/rec.photo.digital/b...
4fcba5d56fea8c7?hl=en&rnum=1

Tony
Related resources
Anonymous
December 8, 2004 3:52:04 AM

Archived from groups: rec.photo.digital (More info?)

"cyclone" <tony@bigpond.com.au> writes:

> "Todd H." <t@toddh.net> wrote in message news:m04qiy9lu6.fsf@ripco.com...
> >
> > Howdy,
> >
> > Windows XP has a context menu Rotate Left and Rotate Right commands in
> > the Explorer context menu for jpeg's (the context menu is the you see
> > when you right click on a JPG file in Windows explorer).
> >
> > That's mighty darned handy. Unfortunately, Microsoft's version of
> > that in XP results in smaller files as well as a noticeable loss in
> > image quality in the process, likely due to using a default low JPEG
> > quality factor in the conversion, and further unfortunately, it does
> > me no good in Windows 2000.
>
> This thread indicated xp jpg rotation was lossless with some evidence to
> back it up. Some talk of it only being lossless for resolutions that are
> multiples of 16 though.
>
> http://groups-beta.google.com/group/rec.photo.digital/b...

Thanks for the interesting link. I strongly question its assertion of
lossless compression, however because I can generate counter
datapoints at will on my XP home machine, it seems.

Trying to figure out then why images from my digital rebel (which is
x16 in X and Y of all resolutions) go, for example from 1.52MB
filesize to 1.18Mb for a 2048 x 1360 image.

I'm no information theory expert, but Windows XP's rotate function is
certainly tossing away something there, and I don't think there's
300MB of metadata that can explain the file size reduction.

Best Regards,
--
Todd H.
http://www.toddh.net/
Anonymous
December 8, 2004 9:00:18 AM

Archived from groups: rec.photo.digital (More info?)

"Todd H." <t@toddh.net> wrote in message news:m04qiy9lu6.fsf@ripco.com...
> Unfortunately, Microsoft's version of
> that in XP results in smaller files as well as a noticeable loss in
> image quality in the process, likely due to using a default low JPEG
> quality factor in the conversion, and further unfortunately, it does
> me no good in Windows 2000.
>
> What I'd like to do is create my own Context menu entries RotateLeft
> and RotateRight for the JPG file type, leveraging the ImageMagick
> command line program convert, in this way:
>
> convert -rotate 90 -quality 95 %1 %1_rot.JPG

This won't help you add a context menu, but you might want to consider the
latest beta of BetterJPEG (http://www.betterjpeg.com/). I am currently
evaluating
it and it seems to be a good tool for lossless rotation and cropping.

You also might something of value in one of the programs listed here:

http://sylvana.net/jpegcrop/losslessapps.html

All of these programs incorporate lossless JPEG transforms.
Anonymous
December 8, 2004 9:28:01 AM

Archived from groups: rec.photo.digital (More info?)

t@toddh.net (Todd H.) writes:

>Trying to figure out then why images from my digital rebel (which is
>x16 in X and Y of all resolutions) go, for example from 1.52MB
>filesize to 1.18Mb for a 2048 x 1360 image.

>I'm no information theory expert, but Windows XP's rotate function is
>certainly tossing away something there, and I don't think there's
>300MB of metadata that can explain the file size reduction.

It's easy enough to check whether something was really lost: Take an
original, make a copy of it, then rotate the copy. Read both into
Photoshop or other editor. Rotate the copy image back to its original
orientation. Calculate the difference between the two images (Photoshop
has a difference operator; other editors probably have something
similar).

The rotation in Photoshop is lossless because it's done on a fully
expanded image. If XP's rotation was lossless too, then the two images
should match exactly.

Dave
Anonymous
December 8, 2004 3:29:38 PM

Archived from groups: rec.photo.digital (More info?)

Keith Sheppard wrote:
>
> My PhotoMan application
> (http://homepages.tesco.net/~Keith.Sheppard/photoman/hom...) also does
> lossless rotation. I really must see about getting it put on the list.

Done. (http://jpegclub.org/losslessapps.html)
However, I noticed that you seem to be doing something strange to the
Exif data while rotating. The rotated file is not recognized as Exif
by some software. See also http://jpegclub.org/exifpatch.html .

Regards
Guido
Anonymous
December 10, 2004 1:40:36 AM

Archived from groups: rec.photo.digital (More info?)

On 2004-12-08, Todd H. <t@toddh.net> wrote:
I'm no information theory expert, but Windows XP's rotate function is
> certainly tossing away something there, and I don't think there's
> 300MB of metadata that can explain the file size reduction.

Actually, there is. The 300D appends a second 1536x1024 JPEG to it's
in-camera JPEG files. See:

http://forums.dpreview.com/forums/read.asp?forum=1031&m...

and http://www.cpe.ku.ac.th/~g4265077/xj/

for more details

--
Erik
Anonymous
December 10, 2004 1:40:37 AM

Archived from groups: rec.photo.digital (More info?)

"E. Magnuson" <edjpgcom@yahoo.com> writes:

> On 2004-12-08, Todd H. <t@toddh.net> wrote:
> I'm no information theory expert, but Windows XP's rotate function is
> > certainly tossing away something there, and I don't think there's
> > 300MB of metadata that can explain the file size reduction.
>
> Actually, there is. The 300D appends a second 1536x1024 JPEG to it's
> in-camera JPEG files. See:
>
> http://forums.dpreview.com/forums/read.asp?forum=1031&m...
>
> and http://www.cpe.ku.ac.th/~g4265077/xj/
>
> for more details

My god--that's perverse. But that'd sure as heck explain it. Thanks
for the great links and education on XP's rotation.

Still looking for any Windows savvy hackers who can answer the
original question to provide similar functionality for Win2K.

Best Regards,
--
Todd H.
http://www.toddh.net/
!