Home » U++ Library support » Archive » DrawData and StoreImageAsString, how?
DrawData and StoreImageAsString, how? [message #3666] |
Mon, 12 June 2006 11:40 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
Image img;
img=aggImg(600,400);
// w.DrawImage(50,50, aggImg(600,400)); //works
// w.DrawImage(50,50, img); //works
String ss=StoreImageAsString(img);
// w.DrawData(50,50,600,400, StoreImageAsString(img), "image-data"); //??
w.DrawData(50,50,600,400, ss, "image"); //??
// w.DrawData(50,50,600,400, StoreImageAsString(img), "image"); //??
// w.DrawData(50,50,600,400, PackRLE(img, img.GetLength()), "image-data"); //??
Any hints?
|
|
|
|
Re: DrawData and StoreImageAsString, how? [message #3668 is a reply to message #3667] |
Mon, 12 June 2006 13:17 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
luzr wrote on Mon, 12 June 2006 10:59 |
You can make it work by registering specific format for it (just like we will be registering AGG format).
Mirek
|
Why to register new format if I'm using upp native RGBA?
Edit:
P.S. What formats are "image" and "image-data"?
[Updated on: Mon, 12 June 2006 13:21] Report message to a moderator
|
|
|
Re: DrawData and StoreImageAsString, how? [message #3670 is a reply to message #3668] |
Mon, 12 June 2006 15:18 |
|
mirek
Messages: 14038 Registered: November 2005
|
Ultimate Member |
|
|
fudadmin wrote on Mon, 12 June 2006 07:17 |
luzr wrote on Mon, 12 June 2006 10:59 |
You can make it work by registering specific format for it (just like we will be registering AGG format).
Mirek
|
Why to register new format if I'm using upp native RGBA?
Edit:
P.S. What formats are "image" and "image-data"?
|
OK, I owe you an extensive explanation I guess...
This is not about pixel format. This is more about rendering a complex data - those data can be anything, not only the array of pixels. The only specific is that the intemmediate "result" of drawing operation, as defined by DataDrawer, must be the Image band (as required by "Render" method).
There is no "image" format, only "image-data" (AFAIK . This "image-data" is encoded image - it can be in any "file-format" currently supported by any plugin, e.g. BMP or PNG or JPG.
Now the advantage here is that this way, when creating a Drawing (e.g. Report), you can store the raster data in original, often compressed, form. This can be quite significant advantage as it can save tens of MBs in Drawing. And, as I have mentioned before, drawing to printer can and is optimized so that it works by bands and optimizes output by "RLE" - detecting significant areas of uniform colors and printing them using simple DrawRect. I believe that such areas are quite common in non-photo printouts.
Frankly, I have added this interface when dealing with one of my apps that stores and prints scanned documents. Then I have realized that this is the ideal tool to cope with sw renderers as well.
Mirek
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 03:30:01 CEST 2024
Total time taken to generate the page: 0.03281 seconds
|