Home » U++ Library support » RichText,QTF,RTF... » Loading Image into qtf
Re: Loading Image into qtf [message #9925 is a reply to message #9918] |
Sat, 09 June 2007 14:18 |
guido
Messages: 169 Registered: April 2006
|
Experienced Member |
|
|
luzr wrote on Fri, 08 June 2007 15:58 | try
dw.DrawImage(0, 0, img);
(You are drawing outside the area at 500, 500).
Or perhaps you really wanted
dw.DrawImage(0, 0, 500, 500, img)
- stretches the image to fill the area.
Anyway, that is still too ineffective, there is a nice function:
RichObject CreateImageObject(const Image& img, int cx = 0, int cy = 0);
which produces RichObject directly, without the need of ImageDraw.
For storing into DB, you can use what you suggest (which reperesents "internal" U++ image format), or you can use any StreamRasterEncoder and SaveString method.
See reference/ImageEncoders - just use SaveString to store to String instead of SaveFile (which stores to file).
|
Playing with the sample code, I forgot to include jpg plugin
Wonder why there is no error in that case...
So, alright. That is working now.
But no success yet, getting an Image instance back from the sqlite BLOB string.
jpg.LoadString() returns an empty Image instance.
I get a string beginning with "\377" from the query, but the decoder doesn't seem to like it.
Btw. I'm using sqlite3 C-API directly now, since the abstraction layer only got in my way while learning SQL. Absence of upp documentation in this regard didn't help either.
PS:
Found a great online resource for learning SQL:
"Akeel Din, SQL - A Practical Introduction"
Guido
|
|
|
|
|
Loading Image into qtf
By: guido on Fri, 08 June 2007 12:18
|
|
|
Re: Loading Image into qtf
By: mirek on Fri, 08 June 2007 15:58
|
|
|
Re: Loading Image into qtf
By: guido on Sat, 09 June 2007 14:18
|
|
|
Re: Loading Image into qtf
By: mirek on Sat, 09 June 2007 18:54
|
|
|
Re: Loading Image into qtf
By: forlano on Mon, 27 August 2007 19:32
|
|
|
Re: Loading Image into qtf
By: forlano on Mon, 27 August 2007 19:57
|
|
|
Re: Loading Image into qtf
By: forlano on Mon, 27 August 2007 23:38
|
|
|
Re: Loading Image into qtf
By: mirek on Tue, 28 August 2007 13:10
|
|
|
Re: Loading Image into qtf
By: forlano on Wed, 29 August 2007 00:23
|
|
|
Re: Loading Image into qtf
By: mirek on Wed, 29 August 2007 11:26
|
|
|
Re: Loading Image into qtf
By: forlano on Wed, 29 August 2007 12:21
|
|
|
Re: Loading Image into qtf
By: dmcgeoch on Tue, 28 August 2007 12:58
|
|
|
Re: Loading Image into qtf
By: guido on Tue, 28 August 2007 16:31
|
Goto Forum:
Current Time: Mon May 06 06:38:39 CEST 2024
Total time taken to generate the page: 0.03150 seconds
|