SQLite/MySQL BLOB-creator application needed.

  • Greetings:
      I'm working within the Cocoa/iPhone environment using SQLite as my
    persistent storage means (albeit, MySQL would be adequate as well).
    I want to create a digital library that stores images as BLOBs to be
    incorporated into an SQLite table.

    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).

    Regards,

    Ric.
  • > 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.
previous month may 2009 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Go to today