14 Sep
2013
14 Sep
'13
3:48 a.m.
The fix is committed as r12516.
I tested by importing several multi-megabyte JPEG photos. The file size indicates that they are imported as JPEG. Similarly, the PDF export is much smaller than previously, because the photos are not re-saved as PNG.
This work is somewhat related to the SAX parser work which remains to be done. If we migrate to a SAX parser, we can avoid storing base64-encoded copies of the data in the XML tree - we can decode them on the fly and store only the binary data, which we could pass directly to cairo_image_surface_set_mime_data(). A similar mechanism could be gradually introduced for other attributes which could benefit from alternate forms of storage, such as CSS and ID references.
Regards, Krzysztof