Compatibility of images saved in database? lazarus / 16-Databases ---------------------------------------------------------------------- Elmug · 2012-07-18 06:04 Hi everyone, I am beginning to wonder if, using SQLite, for instance, If one saves an image to a BLOB field, would OTHER appliations that can read from SQLite's tables data be compatible, as far as also being able to correctly see the image? And vice-versa? Meaning, are the various applications committed to saving blob data in a certain compatible way? Thanks! ---------------------------------------------------------------------- Leledumbo · 2012-07-18 12:20 I think so, as long as the library version matches, or if carefully looked the changes between library version don't break existing database (e.g. only addition of new sql statement, no changes to internal database layout). ---------------------------------------------------------------------- Knipfty · 2012-07-18 13:22 Elmug,  just try it and see.  You'll know as soon as you see it (or not). ---------------------------------------------------------------------- Elmug · 2012-07-19 04:21 Hi Leledumbo and Knipfty, Actually by "other applications" I did not mean "Lazarus applications", but rather applications (.exe specially, Windows) such as programs that read and write to SQLite3. Examples might be M.S. Access, SQLiteAdmin.exe, and others, which are likely using their own libraries, or routines, speciall to write BLOB data. For instance, perhaps they can write the BLOB and read it themselves, but my question is are they to follow a standard tha twould insure compatibility of BLOB data stored? My question comes from not yet having been capable of READING images that I stored in an SQLite database using sqliteADMIN.exe. (This is why it is not practical for me to test as suggested), plus the fact that  I can not yet read the images  I stored as said,  would not be enough a basis for me to conclude that there is incompatibility. Hence I felt it is prudent to ASK and see if someone has some answer, hopefully with some basis. So far, I am in the position that the problem be my code. But I have tried most means that I have found in the web, with no success yet.  I keep getting "wrong format" or "JPEG error" from my little Lazarus apps. I have also posted my code to see if there is something wrong. Thanks for helping out. ---------------------------------------------------------------------- Leledumbo · 2012-07-19 07:09 QuoteFor instance, perhaps they can write the BLOB and read it themselves, but my question is are they to follow a standard tha twould insure compatibility of BLOB data stored?I don't know, it depends on how they store it there. If they store plain image data (no change, no extraction, no byte endianness change, byte swapping, or anything else. simply every bytes in the original file) it should be fine provided that the given storage size is enough. ---------------------------------------------------------------------- Lacak2 · 2012-07-19 08:39 There may be problem if you will use TDBImage for handling stored BLOB. TDBImage stores in the begining of image data file extension, which uses later to recognize type of stored image (BMP, GIF, JPEG or so). This can confuse other 3rd party applications which f.e. expect only JPEG data without any "introducer". ---------------------------------------------------------------------- marcov · 2012-07-19 12:14 Quote from: Lacak2 on July 19, 2012, 10:39:03 amThere may be problem if you will use TDBImage for handling stored BLOB. TDBImage stores in the begining of image data file extension, which uses later to recognize type of stored image (BMP, GIF, JPEG or so). This can confuse other 3rd party applications which f.e. expect only JPEG data without any "introducer". (TDBImage should load and store from type (ft)"GRAPHIC" not (ft)blob.  In most databases the type in the /database/ is in both cases blob or varbytes)