chustar
chustar

Reputation: 12455

What does an image look like as a Blob?

I am working on an AppEngine application, to store images, they have to be stored in a BlobProperty.
Is there a Mac/Linux way to convert images to their Blob representation or is there any tool (especially online) that can do this?

Upvotes: 1

Views: 5256

Answers (2)

OscarRyz
OscarRyz

Reputation: 199215

Blobs do store bytes, and images ( as any other file ) are represented by bytes, so you just store it

See: http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#Blob

Upvotes: 5

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798616

"Blob" stands for "Binary Large OBject". It's bytes. Just instantiate a db.Blob, passing the bytes.

Upvotes: 2

Related Questions