Hey all,
Please note, that BLOB and bytea are different concepts in PostgreSQL:
Large object (BLOB) - is a special structure which provides stream-style
access
to data.
bytea - is a data type for storing binary strings.
To process data of bytea type you need to retrieve the whole object
from the database into a memory. Next, you may use WMemoryResource
or save retrieved data to the file and use WFileResource.
If you want to avoid working with whole objects (to avoid memory overheads)
you may want to use BLOB. To do this you need to extend WResource.
Btw, I think it is reasonable to add WStreamResource into Wt -- the same as
WFileResource but for working with std::istream. I consider it useful.
Koen, how do you think ?
2011/2/8 John Robson <[email protected]>
> Worked, thanks.
>
> I would like show this image (from DB) in browser.
>
> How to convert std::vector<unsigned char> to WImage?
>
>
> WResource *wr = new WResource((*i)->picture); (not work... abstract)
>
> WImage *img = new WImage(this);
> img->setResource(wr);
>
> Thank you,
> John
>
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
--
// Dmitriy.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest