summaryrefslogtreecommitdiffstats
path: root/bindings/python/examples/save_photos.py
diff options
context:
space:
mode:
authorTodd Zullinger <tmzullinger@users.sourceforge.net>2007-07-31 20:42:54 +0000
committerTodd Zullinger <tmzullinger@users.sourceforge.net>2007-07-31 20:42:54 +0000
commitacd33c647ff358dcb43507b9b0e7a9c70fd5f6db (patch)
tree16f02c91b9efa543e3f4daab4b1bbcf3d88859f6 /bindings/python/examples/save_photos.py
parent2720ea4c32aab308f2a879a4018eea9c4766cb4d (diff)
downloadlibgpod-acd33c647ff358dcb43507b9b0e7a9c70fd5f6db.tar.gz
libgpod-acd33c647ff358dcb43507b9b0e7a9c70fd5f6db.tar.xz
libgpod-acd33c647ff358dcb43507b9b0e7a9c70fd5f6db.zip
merge changes from the bug-1723660 branch
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1662 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'bindings/python/examples/save_photos.py')
-rwxr-xr-xbindings/python/examples/save_photos.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bindings/python/examples/save_photos.py b/bindings/python/examples/save_photos.py
index abf23ed..ec8079b 100755
--- a/bindings/python/examples/save_photos.py
+++ b/bindings/python/examples/save_photos.py
@@ -24,6 +24,10 @@
import gpod
+if not hasattr(gpod.Thumbnail, 'get_pixbuf'):
+ print 'Sorry, gpod was built without pixbuf support.'
+ raise SystemExit
+
photodb = gpod.PhotoDatabase("/mnt/ipod")
print photodb
@@ -34,6 +38,6 @@ for album in photodb.PhotoAlbums:
for thumbnail, n in zip(photo.thumbnails,
range(0,len(photo.thumbnails))):
print " ", thumbnail
- thumbnail.save_image("/tmp/%d-%d.png" % (photo['id'],n))
+ thumbnail.get_pixbuf().save("/tmp/%d-%d.png" % (photo['id'],n),"png")
photodb.close()