diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-11-23 15:02:58 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-11-23 15:02:58 +0000 |
commit | 2f2ba10996368cddb4ed536344eb2d26eb66797f (patch) | |
tree | a44dc93a06653376012cf0dd5c30028473f84598 /tests | |
parent | b925ce82459fd14c0b56d7921e9ff6e7a437c0e9 (diff) | |
download | libgpod-2f2ba10996368cddb4ed536344eb2d26eb66797f.tar.gz libgpod-2f2ba10996368cddb4ed536344eb2d26eb66797f.tar.xz libgpod-2f2ba10996368cddb4ed536344eb2d26eb66797f.zip |
* When adding photos to the iPod the user may or may not want to
rotate the picture shown on the iPod screen, for example
deending on EXIF rotation value. This can now be achieved by
passing a new parameter 'rotation' to itdb_photodb_add_photo()
or itdb_photodb_add_photo_from_data(). (Valid values: 0, 90, 180,
270, rotation is counter-clockwise). These two functions now
also accept a GError pointer. As a consequence Itdb_Thumb had to
be extended with a field for the rotation value and
itdb_artwork_add_thumbnail have been extended to accept
@rotation and @error as well.
The actual rotation is carried out in
ithumb-writer.c/ithumb_writer_write_thumbnail() using
gdk_pixbuf_rotate_simple() and require gdk-pixbuf V2.6 or
higher.
In contrast, itdb_track_set_thumbnails() and
itdb_track_set_thumbnails_from_data have been left unchanged,
even though they could be extended to accept @rotation and
@error easily. Please let me know if this is wanted.
* configure.ac
src/itdb.h
src/itdb_artwork.c
src/itdb_photoalbum.c
src/itdb_track.c
src/ithumb-writer.c: implemented changes outlined above.
* tests/test-photos.c: added @rotation and @error to the
itdb_photodb_add_photo() call.
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1338 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-photos.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-photos.c b/tests/test-photos.c index 18d364e..fd89aa4 100644 --- a/tests/test-photos.c +++ b/tests/test-photos.c @@ -265,7 +265,8 @@ static int do_add (int argc, char **argv) { Itdb_Artwork *photo; - photo = itdb_photodb_add_photo (db, argv[i], &error); + photo = itdb_photodb_add_photo (db, argv[i], GDK_PIXBUF_ROTATE_NONE, + &error); if (photo == NULL) { if (error) |