Lossless jpeg rotation? Lossless jpeg rotation?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Lossless jpeg rotation?

Started by richms, October 18, 2005, 02:50:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

richms

I have uploaded a lot of images, but unfortunatly the camera used didnt have the orientation sensor in it to get them the right way up.

They are all 5+ megapixels images, and it seems that the existing rotation doesnt work because of this. Rotating a jpeg should be lossless in any case since I dont want to have the images degrade furthur with another compression cycle.

Can it be done with preserving what little exif data is present in them?

Tranz

hmmm.... Are you expecting people to download and print the images, or just to view them on your website? For web viewing, the quality does not need to be as high as when printing.

You could use another image app like irfanview, which people tend to recommend if you don't want to spend money on one. I'm not sure if online or irfanview rotation will preserve exif data, though... Someone who knows better could jump in.

richms

Some people may want to print them, yeah, so I would like to have the big images up there, I have uploaded 2 gigs of images, and dont like the idea of rotating locally and uploading the 10-15% of them that need rotation.

I was hoping there was a patch to put little buttons over the mid-sized image to fire off a copy of jpegtran or similar on the big image to rotate it, and then re-generate the mid sized and the thumbnails from the newly rotated image.

Stramm

still... it's the best you can do. Rotating the images on the server limits you to GD and ImageMagick (or you serch the web for a command line tool ? I don't know of any ) that both don't rotate lossless. However, the loss in quality is that minimal.. I wouldn't recognize

edit: and of course you'd need enough mem

richms

jpegtran is a tool that can do it. I will be looking into getting it onto the server later tonight, its the adding buttons in coppermine that would have me reading thru php code for hours finding the right place to add it, that I dont really want to do right now.

Worst case is I make a list of the names and then run it overthem from the shell, but I am limited to where I can access it via ssh from because most places I am are http only internet access :(

lrl

richms, did you get anywhere with this?  i was hoping for exactly this feature too...

kegobeer

There's a mod somewhere for using jpegtran.  It only works if you have a host that uses the jpegtran extension.  I've haven't seen too many.

Try searching for jpegtran, and view the oldest topics first.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots