U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » RichText,QTF,RTF... » Loading Image into qtf
Re: Loading Image into qtf [message #9918 is a reply to message #9913] Fri, 08 June 2007 15:58 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
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).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rendering qtf into a window: horrible flicker
Next Topic: Failed to set String format in report from SQLite3
Goto Forum:
  


Current Time: Tue Sep 22 10:04:52 GMT+2 2026

Total time taken to generate the page: 0.00916 seconds