On Mon, Dec 7, 2009 at 9:55 AM, Jean-Christophe Deschamps <j...@q-e-d.org> wrote: > Hi Puneet, > >>Yes, that seems like a reasonable interpretation of the OP's question, >>one I also understood. One thing I don't understand though, >>Jean-Christophe, even though one can enter base64 encoded "images" >>into the db via the sqlite shell, how does one create the base64 >>encoded images? One would need a way to do that on the shell command >>line no? Not to mention, how inconvenient it would be to do for any >>"meaningful" image, as you can see from your own 2x1 pixels image >>example. > > But the hex isn't base64 encoded at all: it's merely a hex byte after > byte linear dump, something that is obvious to get without any > dependancy on SQLite or the environment.
I still don't understand your strategy above. Where am I, the user, supposed to get the "hex byte after byte linear dump" from? Imagine, I have a photograph of you called jcd.jpg sitting on my hard disk at ~/pics/jcd.jpg and I want to insert it as a blob into CREATE TABLE pics (id INTEGER PRIMARY KEY, pic BLOB); via the sqlite3 shell. Could you please give me a step by step on how to do that? Not via a small program written in a programming language, but only via the sqlite3 shell, as both you and I agree that was the implied intent of the OP's question. > BTW, having images stored > direct in hex blobs without any convoluted encoding allows smart > database managers to display the images directly in resultset grid, > which I find very convenient. > > I didn't mean to enforce this as a convenient way to handle routine > operation, except if the particular situation demands it. I fully > agree with your remark that it isn't very practical, but I've slowly > discovered that SQLite is so flexible that it shows up in many > environments where one wouldn't expect a database layer to simply exist > in the first place. > I've no clue as why the OP asked that and what his actual constraints > really are, but if he needs a text only, command-line only, > no-specific-program way to have his job done, then SQLite is still his > friend and not a stumbling block. > > That's all of SQLite glory to offer workable solutions to incredingly > strange situations! > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= Sent from Madison, Wisconsin, United States _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users