
24 Sep
2009
24 Sep
'09
4:27 p.m.
Damien R wrote:
Markus Bader wrote:
Hello
I like to store and load images from a xml file. My problem is now the dynamic array which keeps the image data. I do not want to copy it into a container and I do not want to go in a for loop over every pixel. Any suggestions? ar & make_nvp("data", make_array(mpData, mWidth*mHeight)) ?
also you could try ar & make_nvp("data", binary_object(sizeof(mpData), & mpData)) the cost of xml archiving is going to dominate even if you were to use the default serialization method whch loops over every pixel. XML just has a lot of extra characters and requires parsing - it has to be much slower then a binary format. Robert Ramey