summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2005-10-02 13:22:11 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2005-10-02 13:22:11 +0000
commit87c00b0e96883674c21882bb349df3fa8ea36490 (patch)
treed85a51229542eb10156c2880c307fff9ff4444ab /tests
parent5ed383127a288db4b7401ec783e72db432155055 (diff)
downloadlibgpod-87c00b0e96883674c21882bb349df3fa8ea36490.tar.gz
libgpod-87c00b0e96883674c21882bb349df3fa8ea36490.tar.xz
libgpod-87c00b0e96883674c21882bb349df3fa8ea36490.zip
* Makefile.am: added bindings/... to EXTRA_DIST
* src/itdb.h, src/itdb_playlist.h, src/itdb_private.h: made enum ItdbPlType and enum ItdbPlFlag private and introduced itdb_playlist_set_mpl/_podcast() in addition to the existing itdb_playlist_is_mpl/_podcast() which make the public enums unecessary. * bumped to version 107 * src/ithumb-writer.c: itdb_write_ithumb_files (): commented out g_print() statement as this produced an empty line in gtkpod's warning window. * src/Makefile.am: GDKPIXPUF dependency solved inside source files -- db-artwork-writer-dummy.c no longer required. Now compiles with and without gdkpixbuf. * configure.ac: fixed error in AC_DEFINE_UNQUOTED(HAVE_GDKPIXBUF). * tests/test-covers.c: attached Flavio Stanchina size-patch git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1112 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'tests')
-rw-r--r--tests/test-covers.c39
1 files changed, 32 insertions, 7 deletions
diff --git a/tests/test-covers.c b/tests/test-covers.c
index 0d2c940..f480b6a 100644
--- a/tests/test-covers.c
+++ b/tests/test-covers.c
@@ -41,14 +41,40 @@ ipod_image_to_gdk_pixbuf (Itdb_Image *image)
printf ("width: %d height: %d size: %d\n",
image->width, image->height, image->size);
- if (image->type == ITDB_IMAGE_FULL_SCREEN) {
- row_stride = 100;
- } else if (image->type == ITDB_IMAGE_NOW_PLAYING) {
- row_stride = 42;
- } else {
- return NULL;
+/*
+description photo: size width nano: size width
+==================== ===== ===== ===== =====
+artwork big 39200 140 20000 100
+artwork small 6272 56 3528 42
+photo full-screen ? ? 46464 176
+photo thumbnail ? ? 3108 42
+*/
+
+ switch (image->size)
+ {
+ case 39200: /* ITDB_IMAGE_FULL_SCREEN */
+ row_stride = 140;
+ break;
+
+ case 46464: /* iPod nano photo database full screen */
+ row_stride = 176;
+ break;
+
+ case 6272: /* ITDB_IMAGE_NOW_PLAYING */
+ row_stride = 56;
+ break;
+
+ case 3108: /* iPod nano photo database thumbnails */
+/* if (width > 42) width = 42;
+ if (height > 37) height = 37; ??? */
+ row_stride = 42;
+ break;
+
+ default:
+ return NULL;
}
+
pixels = itdb_image_get_rgb_data (image);
if (pixels == NULL) {
return NULL;
@@ -56,7 +82,6 @@ ipod_image_to_gdk_pixbuf (Itdb_Image *image)
result = gdk_pixbuf_new_from_data (pixels, GDK_COLORSPACE_RGB, FALSE,
8, image->width, image->height,
- /*image->width * 3, */
row_stride * 3,
(GdkPixbufDestroyNotify)g_free,
NULL);