summaryrefslogtreecommitdiffstats
path: root/src/db-artwork-writer.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-artwork-writer.c
parent5d816357ff12ad5a84a9689c5b2a7292f155fafa (diff)
downloadlibgpod-tmz-26ff49139f22afdb3263cd534a05bf7121ccb0b6.tar.gz
libgpod-tmz-26ff49139f22afdb3263cd534a05bf7121ccb0b6.tar.xz
libgpod-tmz-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-artwork-writer.c')
-rw-r--r--src/db-artwork-writer.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c
index ca46417..655d05b 100644
--- a/src/db-artwork-writer.c
+++ b/src/db-artwork-writer.c
@@ -328,7 +328,6 @@ write_mhni (Itdb_Image *image, iPodBuffer *buffer)
unsigned int total_bytes;
int bytes_written;
iPodBuffer *sub_buffer;
- unsigned int dim;
if (image == NULL) {
return -1;
@@ -351,12 +350,10 @@ write_mhni (Itdb_Image *image, iPodBuffer *buffer)
mhni->correlation_id = GINT_TO_LE (IPOD_THUMBNAIL_FULL_SIZE_CORRELATION_ID);
break;
}
- dim = image->width & 0xffff;
- dim <<= 16;
- dim |= image->height & 0xffff;
- mhni->image_dimensions = GINT_TO_LE (dim);
- mhni->image_size = GINT_TO_LE (image->size);
- mhni->ithmb_offset = GINT_TO_LE (image->offset);
+ mhni->image_width = GINT16_TO_LE (image->width);
+ mhni->image_height = GINT16_TO_LE (image->height);
+ mhni->image_size = GINT32_TO_LE (image->size);
+ mhni->ithmb_offset = GINT32_TO_LE (image->offset);
sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
if (sub_buffer == NULL) {