RE: SQLite/MySQL BLOB-creator application needed.
RE: SQLite/MySQL BLOB-creator application needed.
- Subject: RE: SQLite/MySQL BLOB-creator application needed.
- From: Kirk Kerekes <email@hidden>
- Date: Thu, 28 May 2009 12:14:46 -0500
So I need a simple OS X application (either an existing desktop
application, or a simple command-line application) that can serialize
a PNG image
into a BLOB (keeping all metadata, etc.) for access by a SQLite (or
any SQL-type DB) engine (used within a Cocoa/iPhone application).
AFAIK a SQLite3 BLOB is just the -bytes of an NSData. So if your PNG
is a file, read it into an NSData instance and then use SQLite BLOB
operations to insert the [data bytes] into the row. If your PNG is in
memory, it is presumably either an NSImage (where it has largely lost
its original PNG-nature) or it is an NSData already.
I'm not sure which "metadata" you want to preserve -- you probably
ought to be more specific.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden