Update of /cvsroot/gtkpod/libgpod/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv22852/src
Modified Files:
itdb_artwork.c
Log Message:
* tests/test-photos.c: added possibility to dump all photos into a
directory:
tests/test-photos dump <mountpoint> <output_dir>
* src/itdb_artwork.c: changed byte order for full screen iPod
Nanos.
Index: itdb_artwork.c
===================================================================
RCS file: /cvsroot/gtkpod/libgpod/src/itdb_artwork.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- itdb_artwork.c 30 May 2006 14:09:43 -0000 1.11
+++ itdb_artwork.c 2 Jun 2006 17:01:48 -0000 1.12
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-05-26 20:49:27 jcs>
+/* Time-stamp: <2006-06-03 01:57:04 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -379,20 +379,31 @@
{
void *pixels565;
guchar *pixels;
+ guint byte_order;
+ const Itdb_ArtworkFormat *img_info;
g_return_val_if_fail (device, NULL);
g_return_val_if_fail (thumb, NULL);
-
- /* no rgb pixel data available (FIXME: calculate from real
- * image file) */
- if (thumb->size == 0) return NULL;
-
+ g_return_val_if_fail (thumb->size != 0, NULL);
+ img_info = itdb_get_artwork_info_from_type (device, thumb->type);
+ g_return_val_if_fail (img_info, NULL);
+
pixels565 = get_pixel_data (device, thumb);
if (pixels565 == NULL) {
return NULL;
}
-
- pixels = unpack_RGB_565 (pixels565, thumb->size, device->byte_order);
+
+ byte_order = device->byte_order;
+ /* Swap the byte order on full screen nano photos */
+ if (img_info->correlation_id == 1023)
+ {
+ if (byte_order == G_LITTLE_ENDIAN)
+ byte_order = G_BIG_ENDIAN;
+ else
+ byte_order = G_LITTLE_ENDIAN;
+ }
+
+ pixels = unpack_RGB_565 (pixels565, thumb->size, byte_order);
g_free (pixels565);
return pixels;
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2