summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2008-07-20 14:43:19 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2008-07-20 14:43:19 +0000
commitd1030043df70a82138bcb54a5ecd717f4e7011d2 (patch)
tree17e94d4e98c3284729cf08da18c4ba549510a369
parent3f1ef04039b68034b7e5dab55679a21ef9752ebd (diff)
downloadlibgpod-d1030043df70a82138bcb54a5ecd717f4e7011d2.tar.gz
libgpod-d1030043df70a82138bcb54a5ecd717f4e7011d2.tar.xz
libgpod-d1030043df70a82138bcb54a5ecd717f4e7011d2.zip
* 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. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2060 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r--ChangeLog8
-rw-r--r--src/itdb_device.c3
-rw-r--r--src/ithumb-writer.c9
3 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 05366f3..978b6bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);
}