[Etoys] Viewing a preview
karlramberg at gmail.com
Sun Jan 18 06:27:08 EST 2009
Walter Bender wrote:
> Here is the Python/GTK way to do this, for what it is worth:
> from sugar.datastore import datastore
> #my_dsobject is of type datastore.DSObject
> #object_id is a datastore object
> my_dsobject = datastore.get(object_id)
> pixbufloader = gtk.gdk.pixbuf_loader_new_with_mime_type('image/png')
> #Access the 'preview' property
> #Note that the preview image is 300x225
> pixbuf = pixbufloader.get_pixbuf()
I got it working my self but there are quite a few of the previews that
don't seem to work, and most criticaly photos from Record I can't get to
> On Sat, Jan 17, 2009 at 9:40 AM, Karl Ramberg <karlramberg at gmail.com> wrote:
>> I'm testing out stuff in my JournalMorph but run into stuff I can't
>> figure out.
>> I'm trying to view a png preview stored in a ByteArray but I don't get
>> it to work.
>> I make the ByteArray a RWBinaryOrTextStream but the
>> PNGReadWriter formFromStream: aStream do not recognize the format.
>> I'm not sure how to proceed.
>> I also tried to write out a png to the Journal but that would not work
>> either :-(
>> Etoys mailing list
>> Etoys at lists.laptop.org
More information about the etoys-dev