Re: Inserting pictures in a document by code
- From: Brendan Murphy <bmurphy@xxxxxxxxxxxxxxxxxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Tue, 23 Dec 2008 09:55:17 -0600
Yoann Besnard wrote:
I've noticed that when I include a large picture (PNG 1600x1000) in an
FTEditfield, store it in an XML file and open the XML file with the
SetXml method, it's very slow. So, I'm considering developing a system
that would keep all pictures separately and store all pictures'
position and size. Then when the user opens the document, it would
insert all the pictures at the right place and the right size in the
document.
What are the methods I would need to call to achieve this goal?
There is a possibility here that I can help you with this by
speeding up the opening process of the XML document. This can be
done by deferring the decoding of the picture data to a background
process. This will allow the document to open faster for the user. That
would be a generally good thing for everyone and I'll put it on my
list for consideration.
Another possibility for you is to implement a custom object. That
way you can implement references to external pictures. By using
custom objects you don't have to store the size or position
because that is in the XML document and you can directly load the
picture when it is constructed.
FTC Website:
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in
the subject field.
Other related posts: