Bernd Stramm wrote:
> Hello all,
> 
> probably this has come up before, but I can't find it:
> 
> my application has to display JPEG images, but does not load
> them from disk files. They come in as blobs from a remote database.
> 
> Is there a way to load these into an Fl_JPEG_image?
> 
> Right now I am reduced to writing them to a temp file, and then reading that 
> into the image. But that is a bad solution: it assumes that I can write to 
> disk in this application.
> 
> I read the code (fltk 1.1.9), there doesn't seem to be a straightforward way, 
> can't just hook up an istream, or something of that nature.

        If it were me, and the blobs were in ram as RGB data, then
        I wouldn't use Fl_JPEG_image at all.. it's no longer a jpeg
        image, but already decoded into rgb, so you'd probably just
        want to slap it up on the screen with fl_draw_image(), eg:
        http://seriss.com/people/erco/fltk/#FlDrawImage
        ..which shows how to take an RGB image buffer and display it
        to the screen with one simple fl_draw_image() call in the
        draw() function.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to