Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Image in QLITE3 database (Load an ImgCtrl image from an SQLITE3 database)
Image in QLITE3 database [message #50237] Sat, 01 September 2018 17:32 Go to previous message
raanan is currently offline  raanan
Messages: 1
Registered: September 2018
Junior Member
I can read a BLOB field that I know contains an image of some kind (probably JPEG or PNG) from an SQLITE3 database into a String, but that is afar as I can get. I did not create or populate this database (it is used by an application that I use, which works and shows these images). In fact, the images are pictures that I took with my phone, and added to the database with the application. But how do I set this String value into an ImgCtrl to show in window?

I have tried as follows.
String photo; // set with SQL select statement

And then this, which did not work.
Image img(photo);
ImgCtrl ctrl;
ctrl.SetImage(img); // crashes with no message

I tried LOG(photo), which showed a lot of binary values, including the text JFIF, so I did as follows.
FileOut out;
out.Open("test_photo.jfif");
out.Put(recipe.photo);
out.Close();
Sure enough, it created exactly the photo file that I expected, a JFIF file that I was able to open and view. Unfortunately, there are no examples on the web site showing how to load an ImgCtrl from such a String. An example would of course be appreciated.

[Updated on: Sun, 02 September 2018 01:23]

Report message to a moderator

 
Read Message
Read Message
Previous Topic: PostgreSQL NaN fetching from DB
Next Topic: [SOLVED] How to use aliases with SqlExp?
Goto Forum:
  


Current Time: Tue May 07 12:34:48 CEST 2024

Total time taken to generate the page: 0.02341 seconds