Page 1 of 1

Lossless cropping of JPEG images

PostPosted: Mon May 30, 2005 8:11 pm
by kiig
Hi all.

I normally use Cam2pc to rotate images, - specially when I'm batch converting images for friends (I need them all in landscape mode to have my Photoshop batch jobs process them correctly).

Usually, - this is no problem, - and works fast and efficient.

Yesterday I got a new batch of images, - and I discovered that the final output was not in the quality I expected.... looked a bit, - and discovered a huge file-decrease when rotating with Cam2pc.. I did a 'reset prompts' - and yes it informs me indeed that it can't be done, - fair enough.

Now I'm just curious, - why couldn't theese images be lossless rotated ? I know you can't answer without seeing some of the images, - but in a more generel manner.. Does lossless rotation imply that EXIF data should be retained, - or is it maybe because my friend cropped some of the images (thus breaking the 8x8 16x8 and so on format I've read about), - I just haven't noticed it before..

I did a search for lossless rotate programs, - and Cam2PC certainly comes up as one of them :-) but I did try another one on the list, - and that rotated without loosing quality.


Can anyone enlighten me on the subject...? and maybe tell me what makes Cam2pc perform lossless rotaton and what makes it not do it.

Kim.

Lossless Cropping/Rotation

PostPosted: Tue May 31, 2005 7:40 am
by NACarter
Hi Kim,

Lossless cropping can be done on JPEGs, provided they are cropped to certain sizes. Then lossless rotation can also be done. See this page for more details: http://www.faqs.org/faqs/jpeg%2Dfaq/part1/index.html and look for subject [10]. In particular, it is possible to do 90-degree rotations and flips losslessly, if the image dimensions are a multiple of the file's block size (typically 16x16, 16x8, or 8x8 pixels for color JPEGs).

Nick

PostPosted: Tue May 31, 2005 7:56 am
by kiig
thanx for the link.

I still don't understand why Cam2pc couldn't do it, - when another application was able to.....

I'll just keep my eyes focused on the filesizes then :-)

PostPosted: Tue May 31, 2005 9:12 am
by NACarter
I think your problem was that your friend cropped the images to something other than multiples of the blocks you identified (16x8 etc.). Once that was done you were no longer able to losslessly rotate them.

PostPosted: Tue May 31, 2005 9:17 am
by kiig
yeah, but it still doesn't explain why the other software would do it... One thing is that Cam2pc is telling me It can't do it, - the other software might not tell me :-), - but the 'original' image filesize was around 50K, - after rotation with cam2pc it was 22K, - still 50 K with the other software, - and no noticeble quality difference from the original

PostPosted: Wed Jun 29, 2005 9:30 pm
by MarcoS
Hi!

Are there any certain answers concerning losless rotating or not? That would be very important to know. It's a kind of k.o.-criteria for using cam2pc.

I'm looking forward to get a real statement.

Thanks,
Marco

P.S.: Any losless operation (rotate, mirrow, etc.) ist only possible, if the pixelsize can bei devided by 8/16. No program can do this with other pixelsizes!

PostPosted: Wed Jun 29, 2005 11:10 pm
by kiig
I would also like to know the answer...

My current workaround is to rotate in quality 80, - when I want the final output to look like Photoshop quality 50!...

Don't know if this is a fix for lossy rotation or what, - but it works for me.

My workflow is this :
I get a number of images, - my own or from others.
I rotate the ones that have been rotated by another program due to exif data ( eos1d mk.ii will tell in the exif if it's a portrait or not), - using quality 100 and Cam2pc
Photoshop batch resizes all, - requiring 'landscape' format, - creates 1024 jpegs, - quality 50
I rotate the previously rotated images back into place, - with Cam2pc, - this time using quality 80 (and not 50), and the file sizes equals more or less. (Cam2pc quality 80 equals Photoshop quality 50)

It actually also happens when I get unedited/uncropped images from the Eos1D cameras, - and I can't recall it has been a problem before.

(I used to rotate them back in place with quality 50 in Cam2pc, - because this was the setting I used from Photoshop and have never noticed the decreased filesize = loss of quality before..)

Could it be a 4.5.2 feature we just haven't noticed before ? in a browser I can't allways tell if the file is 'too small' or too big, - only certain images will tell the tale, - depending on the resolution (meaning : with 1600x1200 I can't tell the difference on my screen, - if I change it to 1024x768 I *can* see the difference, - very weird)

but the above works for me...and I *still* prefer Cam2pc above all others, - though I've tried a fairly large amount of different programs now....

and I counted recently :-) I've done 10.000 images sofar, this year, - using Cam2pc in my workflow, - so I need a tight, - stable, - and fast workflow, - and Cam2pc is still 'it' for me. :-)