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
commit26ff49139f22afdb3263cd534a05bf7121ccb0b6 (patch)
treec221a35f2709820cb0d26fb7dd4745167a5b2480 /src/db-image-parser.c
parent5d816357ff12ad5a84a9689c5b2a7292f155fafa (diff)
downloadlibgpod-26ff49139f22afdb3263cd534a05bf7121ccb0b6.tar.gz
libgpod-26ff49139f22afdb3263cd534a05bf7121ccb0b6.tar.xz
libgpod-26ff49139f22afdb3263cd534a05bf7121ccb0b6.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;
}