summaryrefslogtreecommitdiffstats
path: root/src/db-image-parser.c
diff options
context:
space:
mode:
authorFlavio Stanchina <fstanchina@users.sourceforge.net>2005-10-10 20:40:45 +0000
committerFlavio Stanchina <fstanchina@users.sourceforge.net>2005-10-10 20:40:45 +0000
commit5191d5305df522f29ebf112fdd0cdf89b6fcb870 (patch)
treec221a35f2709820cb0d26fb7dd4745167a5b2480 /src/db-image-parser.c
parentf532f816cc4e478523932dc3ce914b840f5c06bb (diff)
downloadlibgpod-5191d5305df522f29ebf112fdd0cdf89b6fcb870.tar.gz
libgpod-5191d5305df522f29ebf112fdd0cdf89b6fcb870.tar.xz
libgpod-5191d5305df522f29ebf112fdd0cdf89b6fcb870.zip
Added a few structures (notably MHBA and MHIA) to support the Photo Database.
Split 'gint32 image_dimensions' into 'gint16 image_height, image_width'. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1115 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/db-image-parser.c')
-rw-r--r--src/db-image-parser.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/db-image-parser.c b/src/db-image-parser.c
index 3842135..2d8e8dc 100644
--- a/src/db-image-parser.c
+++ b/src/db-image-parser.c
@@ -154,10 +154,10 @@ ipod_image_new_from_mhni (MhniHeader *mhni, const char *mount_point)
}
img->filename = ipod_image_get_ithmb_filename (mount_point,
GINT_FROM_LE (mhni->correlation_id));
- img->size = GINT_FROM_LE (mhni->image_size);
- img->offset = GINT_FROM_LE (mhni->ithmb_offset);
- img->width = (GINT_FROM_LE (mhni->image_dimensions) & 0xffff0000) >> 16;
- img->height = (GINT_FROM_LE (mhni->image_dimensions) & 0x0000ffff);
+ img->size = GINT32_FROM_LE (mhni->image_size);
+ img->offset = GINT32_FROM_LE (mhni->ithmb_offset);
+ img->width = GINT16_FROM_LE (mhni->image_width);
+ img->height = GINT16_FROM_LE (mhni->image_height);
switch (mhni->correlation_id) {
case IPOD_THUMBNAIL_FULL_SIZE_CORRELATION_ID:
@@ -169,8 +169,8 @@ ipod_image_new_from_mhni (MhniHeader *mhni, const char *mount_point)
img->type = ITDB_IMAGE_NOW_PLAYING;
break;
default:
- g_print ("Unrecognized image size: %08x\n",
- GINT_FROM_LE (mhni->image_dimensions));
+ g_print ("Unrecognized image size: %ux%u\n",
+ img->width, img->height);
g_free (img);
return NULL;
}