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
commit6dda4b59bb0f788da38823a035f28d4c515a38be (patch)
tree16f02c91b9efa543e3f4daab4b1bbcf3d88859f6 /bindings/python/examples/save_photos.py
parentbd2fc5d392af67e46ee0fe8bf31b4f9e457f2da3 (diff)
downloadlibgpod-6dda4b59bb0f788da38823a035f28d4c515a38be.tar.gz
libgpod-6dda4b59bb0f788da38823a035f28d4c515a38be.tar.xz
libgpod-6dda4b59bb0f788da38823a035f28d4c515a38be.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()