summaryrefslogtreecommitdiffstats
path: root/src/ithumb-writer.c
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2007-10-29 21:52:44 +0000
committerChristophe Fergeau <teuf@gnome.org>2007-10-29 21:52:44 +0000
commit60a9f4bad17d86056f7282c633a1e6efa52fe7f1 (patch)
tree2b882a8a9383a5ab0b372bb797ca50133813242d /src/ithumb-writer.c
parent0c365c1e713578373dac48e00c7c208f8cf5418a (diff)
downloadlibgpod-60a9f4bad17d86056f7282c633a1e6efa52fe7f1.tar.gz
libgpod-60a9f4bad17d86056f7282c633a1e6efa52fe7f1.tar.xz
libgpod-60a9f4bad17d86056f7282c633a1e6efa52fe7f1.zip
Patch from Filippo Giunchedi <filippo@esaurito.net>
* src/itdb_artwork.c: add I420 unpacker * src/itdb_device.c: iPod classic full screen photo format is I420 * src/itdb_device.h: add I420 format * src/ithumb-writer.c: add stub for an I420 packer git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1746 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/ithumb-writer.c')
-rw-r--r--src/ithumb-writer.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c
index 2c925a8..5763634 100644
--- a/src/ithumb-writer.c
+++ b/src/ithumb-writer.c
@@ -297,6 +297,15 @@ pack_rec_RGB_555 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info,
return deranged_pixels;
}
+static guchar *
+pack_I420 (GdkPixbuf *orig_pixbuf, const Itdb_ArtworkFormat *img_info,
+ gint horizontal_padding, gint vertical_padding,
+ guint32 *thumb_size)
+{
+ // FIXME do something
+ g_return_val_if_fail (img_info, NULL);
+ return NULL;
+}
/* pack_UYVY() is adapted from imgconvert.c from the GPixPod project
* (www.gpixpod.org) */
@@ -702,6 +711,13 @@ ithumb_writer_write_thumbnail (iThumbWriter *writer,
thumb->vertical_padding,
&thumb->size);
break;
+ case THUMB_FORMAT_I420_BE:
+ case THUMB_FORMAT_I420_LE:
+ pixels = pack_I420 (pixbuf, writer->img_info,
+ thumb->horizontal_padding,
+ thumb->vertical_padding,
+ &thumb->size);
+ break;
}