On Fri, Jul 17, 2009 at 08:15:16AM -0700, Bart van Andel wrote:
>
> > BTW: Probably this is true for every image size of any camera, but
> > isn't a lossless jepg rotation only possible for images with sizes
> > that can be writen as 2^n or multiples? (So a 2x3 pixel images cannot
> > be rotated lossless.)
>
> JPEG operates on 8x8 pixel blocks, so if the resolution is a multiple
> of 8, it's easy. "If the image is not an exact multiple of 8 pixels in
> width or height, it is temporarily padded out to that size" (quoted
> from "The image processing handbook" by John C. Russ, page 118), but I
> don't know what happens when you try to rotate that.
The left and top sides of the image start with a "full" 8x8 block.
If you rotate by +/-90 degrees one will become the other, but either
the right side will become top, or the bottom side will become left.
So, when that side is not at a multiple of 8, that side will have to
be padded out.
However for digital camera images, this is not likely to happen.
All my cameras have provided 8x8 aligned images.
Here is the list of supported resolutions for ONE camera of each of
the manufacturers from the first half of the alphabet. (I got bored
and this proves my point I think...)
There is ONE resolution that is not evenly divisible by 8. It's likely
a type from dpreview.
agfa DC600UW 2816 x 2112, 2048 x 1536, 640 x 480
canon EOS 500D 4752 x 3168 3456 x 2304, XXX 2353 x 1568
casio EX-Z29 3648 x 2736, 3648 x 2432, 3648 x 2048,
3072 x 2304, 2304 x 1728, 1600 x 1200, 640 x 480
Epson R-D1x 3008 x 2000, 2240 x 1488
Fuji Z300 3648 x 2736, 3648 x 2056, 2592 x 1944, 2048 x 1944,
1920 x 1080 1600 x 1200, 640 x 480
HP MZ67 3264 x 2448
Kodak Z1485IS 4352 x 3264, 4352 x 3264, 4352 x 2896, 4352x 2448,
2592 x 1944, 2592 x 1728, 2592 x 1456, 2048 x 1536,
2048 x 1360, 2048 x 1152, 1800 x 1200, 1920 x 1080,
1280 x 960
Konika Z6 2816 x 2112, 2272 x 1704, 1600 x 1200, 640 x 480
kyocera M400R 2272 x 1704, 1600 1200, 1280 x 960, 640 x 480
(the sensor is usually a bit bigger than this to prevent the
algorithms in the camera to have to special-case the borders. And they
don't want to handle partial jpeg blocks. So they simply chose a size
evenly divisible by 8.)
Roger.
--
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"hugin and other free panoramic software" group.
A list of frequently asked questions is available at:
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~----------~----~----~----~------~----~------~--~---