ArcObjects Library Reference (GeoDatabase)  

IXmlPropertySet.TransformImages Method

Transforms encoded thumbnail and image enclosures to files and links them into the metadata.

[Visual Basic .NET]
Public Sub TransformImages ( _
    ByVal Path As String, _
    ByRef fileNames As Object _
)
[C#]
public void TransformImages (
    string Path,
    ref object fileNames
);
[C++]
HRESULT TransformImages(
  BSTR Path,
  VARIANT* fileNames
);
[C++]

Parameters

Path [in]   Path is a parameter of type BSTR fileNames [out]   fileNames is a parameter of type VARIANT

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Do NOT save metadata after applying the TransformImage method, otherwise the img tags will be saved and the enclosures themselves will be lost. To further explore this, open the metadata file in a Browser that supports XML, an XML editor, or text editor. At the same time look at the file in ArcCatalog with the XML stylesheet. Search for the element Binary, then notice the differences in the documents as they appear in ArcCatalog.

Thumbnails and image enclosures are not stored in the Binary/Thumbnail/Data and Binary/Enclosure/Data elements respectively. TransformImage is used to decode Thumbnails and images and save them to files, then replace the original elements with HTML <img> tags that contain links to those files. For example, ArcCatalog applies this method to the metadata each time it is opened, this lets you see Thumbnails and Image Enclosures in ArcCatalog.

Path names are created using the supplied string, Path. In the example below, Path is set to "c:\temp\", while the file name is "expImg" (an incremental number is added to the file name for each transformation; expImg0, expImg1, expImg2, etc). The appropriate file extension is added.  If no Path is supplied, images are written to temp directory location determined by user environment variables.

See Also

IXmlPropertySet Interface