[Gambas-user] Save imageview.image back to database

bb adamnt42 at gmail.com
Mon Sep 27 14:03:18 CEST 2021


On Mon, 2021-09-27 at 12:05 +0200, Tobias Boege via User wrote:
> On Mon, 27 Sep 2021, bb wrote:
> > I have searched and searched for this to no avail.
> > 
> > I have an imageview with an image. I want to save it to the
> > database as
> > a BLOB.
> > 
> > I know well how to do it the other way around, take the database
> > blob
> > and save it to a temporary file, then load the ImageView.Image from
> > that file.
> > 
> > I just can't remember or find how to do the save way.
> > 
> 
> Under app/examples/Database there is the old PictureDatabase example
> which
> taught me how to do it. You take your Image, save it to a temporary
> file
> and then get the bytes from File.Load() into the Blob.
> 
> I don't think there are methods on Image or Picture that allow to do
> it
> in-memory (but there should be).
> 
> Best,
> Tobias
> 
Thanks Tobi, that was the thing I was looking for... everywhere but 

b 



More information about the User mailing list