diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/itdb_device.c | 3 | ||||
-rw-r--r-- | src/ithumb-writer.c | 9 |
3 files changed, 17 insertions, 3 deletions
@@ -1,3 +1,11 @@ +2008-07-20 Jorg Schuler <jcsjcs at users.sourceforge.net> + + * src/ithumb-writer.c (pack_RGB_565), (pack_RGB_555) + (pack_RGB_888): handle horizontal padding correctly + (affected pictures in portrait format). + + * src/itdb_device.c: added some comments. + 2008-07-18 Jorg Schuler <jcsjcs at users.sourceforge.net> * src/itdb_device.c (itdb_device_set_timezone_info): avoid g_stat diff --git a/src/itdb_device.c b/src/itdb_device.c index f833823..5b29780 100644 --- a/src/itdb_device.c +++ b/src/itdb_device.c @@ -357,6 +357,7 @@ static const Itdb_ArtworkFormat ipod_touch_1_photo_info[] = { { -1, -1, -1, -1} }; +/* also used for 3G Nano */ static const Itdb_ArtworkFormat ipod_classic_1_cover_art_info[] = { /* officially 55x55 -- verify! */ {1061, 56, 56, THUMB_FORMAT_RGB565_LE}, @@ -365,6 +366,7 @@ static const Itdb_ArtworkFormat ipod_classic_1_cover_art_info[] = { { -1, -1, -1, -1} }; +/* also used for 3G Nano */ static const Itdb_ArtworkFormat ipod_classic_1_photo_info[] = { {1067, 720, 480, THUMB_FORMAT_I420_LE}, {1024, 320, 240, THUMB_FORMAT_RGB565_LE}, @@ -372,6 +374,7 @@ static const Itdb_ArtworkFormat ipod_classic_1_photo_info[] = { { -1, -1, -1, -1} }; +/* also used for 3G Nano */ static const Itdb_ArtworkFormat ipod_classic_1_chapter_image_info[] = { /* These are the same as for the iPod video... -- labeled by the iPod as "chapter images" */ diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c index 95d4a3d..6d15b6c 100644 --- a/src/ithumb-writer.c +++ b/src/ithumb-writer.c @@ -154,7 +154,8 @@ pack_RGB_565 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info, } else { guchar *cur_pixel; - cur_pixel = &pixels[h*row_stride + w*channels]; + cur_pixel = &pixels[h*row_stride + + (w - horizontal_padding)*channels]; packed_pixel = get_RGB_565_pixel (cur_pixel, byte_order); } result[line + w] = packed_pixel; @@ -260,7 +261,8 @@ pack_RGB_555 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info, } else { guchar *cur_pixel; - cur_pixel = &pixels[h*row_stride + w*channels]; + cur_pixel = &pixels[h*row_stride + + (w-horizontal_padding)*channels]; packed_pixel = get_RGB_555_pixel (cur_pixel, byte_order, FALSE); } @@ -356,7 +358,8 @@ pack_RGB_888 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info, } else { guchar *cur_pixel; - cur_pixel = &pixels[h*row_stride + w*channels]; + cur_pixel = &pixels[h*row_stride + + (w-horizontal_padding)*channels]; packed_pixel = get_RGB_888_pixel (cur_pixel, byte_order, FALSE); } |