|
Adds an image to the current page returning the ID of the newly
added object.
In general you want the AddImageObject method rather than this
one, as AddImageFile embeds images using a restricted range of
ReadModules
and transparency options.
This method only supports JPEG, JPEG 2000, TIFF, EMF, WMF, PS
(PostScript) or EPS (Encapsulated PostScript) and always preserves
transparency.
AddImageFile and AddImageObject
treat EMF and WMF files differently. AddImageFile defaults to the
EmfVector ReadModule
which means that the vector nature of such files will be preserved.
AddImageObject defaults to the
BasicImage ReadModule which means that such files will be
rasterized. For more details see the ReadModule
property.
The image is scaled to fill the current Rect. It is transformed using the
current Transform.
|
Transparency. Occasionally you may find that you need to
invert the transparency of your image. To do this you can assign a
decode array using the ID returned from this function.
To invert the transparency:
theDoc.SetInfo(theDoc.GetInfoInt(theID, "XObject"), "/SMask*/Decode", "[1 0]");
A similar technique can be used for inverting or altering color
levels on the image itself.
To invert an RGB image:
theDoc.SetInfo(theDoc.GetInfoInt(theID, "XObject"), "/Decode", "[1 0 1 0 1 0]");
|
|
|
|