Actions
Support #3454
closedWt::WPainter draw images which in memory as char array
Start date:
07/10/2014
Due date:
% Done:
0%
Estimated time:
Description
I want to use Wt::Wpainter (
element) to draw a image which in memory as char array.
However, Wpainter only have the method "drawImage (const WRectF &rect, const Image &image)", and the Class Image only have the std::string format arguments, "Image (const std::string &url, int width, int height)".
So, How to paint the image which is in memory ,but not in local disk.
AFAIK, the char array can be converted to Wt::WImage, but, it is corresponding to element, which is slower loading many large images.
So, Is any tips and tricks to use Wt::painter to draw image in memory? Thanks!
Updated by Koen Deforche about 9 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
You need to use WMemoryResource, and pass it's url() to the Image() constructor.
Updated by Koen Deforche about 9 years ago
- Tracker changed from Feature to Support
Updated by Koen Deforche about 9 years ago
- Status changed from Resolved to Closed
Actions