Christophe Fergeau wrote:
> On the iPod Photo, thumbnails in the .ithmb file always occupies the
> same space, which is 140*140*2 or 56*56*2 bytes [...]
OK, I understand now. So row_stride doesn't depend on the actual image
width/height, but only on the largest possible image size for the
specific iPod model and kind of image. On the nano photo database, full
screen images are 176x132 and they decode almost correctly (more later)
with a stride value of, you guessed it, 176. On the other side,
thumbnails are 42x37 and they decode correctly with a stride value of
42, but some images claim to be as large as 56 pixels wide or 50 pixels
high! Of course there's not enough data for that, so images look fine
(i.e. not misaligned) but in certain images some pixels at the right are
a duplicate of the left side, or there are a few rows of garbage at the
bottom. By looking at the thumbnails on the iPod, it looks like narrow
images were cropped to fit more nicely on the screen, so I guess that
image sizes like 56x37 or 41x50 are the original sizes before cropping.
We'll have to notice that and limit ourselves to the actual maximum
possible image size.
Now let's talk about full screen images. The stride value is correct,
but it looks like the RGB channels are somewhat swapped around. I'll do
more tests now, it looks like it's being decoded as RGB but it's really
BGR (or vice versa).
>>FYI, the correlation IDs for the photo database on the nano are:
>> #define IPOD_NANO_PHOTO_FULL_SCREEN_CORRELATION_ID 1023
>> #define IPOD_NANO_PHOTO_THUMBNAIL_CORRELATION_ID 1032
> What are the names of the .ithmb files on your iPod Nano? F1023_1.ithmb
> and F1027_1.ithmb ? Or F1031_1.ithmb and F1027_1.ithmb like on Jorg's
Note that I'm talking about *photos*, not album artwork:
ls -l /home/flavio/iPod/Photos/Thumbs/
-r-xr-xr-x 1 flavio flavio 2741376 2005-09-23 18:01 F1023_1.ithmb
-r-xr-xr-x 1 flavio flavio 183372 2005-09-23 18:01 F1032_1.ithmb
I have no artwork on my nano currently, but I'll upload some as soon as
possible so I can test that too.