TransformImage
IPDFDocument4 :: Images

See Also Example
Collapse All

This method transforms a specified image.

Syntax

HRESULT TransformImage (
LONG imageNumber,
ImageTransformation transformation
)
Parameters
imageNumber
Number of an image in the PDF document's images collection

transformation
Transformation type

Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

The index of the image can be retrieved from any image loading method, such as AddImageFromFile.

Example

Transforming an Image

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
ind := PDF.AddImageFromFile('ClipBoard_IE.gif');
PDF.TransformImage(ind, itFlip);
PDF.TransformImage(ind, itNegative);
PDF.ShowImage(ind, 10, 10);
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
long ind = PDF->AddImageFromFile("ClipBoard_IE.gif");
PDF->TransformImage(ind, itFlip);
PDF->TransformImage(ind, itNegative);
PDF->ShowImage(ind, 10, 10);
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
long ind = PDF.AddImageFromFile("ClipBoard_IE.gif");
PDF.TransformImage(ind, ImageTransformation.itFlip);
PDF.TransformImage(ind, ImageTransformation.itNegative);
PDF.ShowImage(ind, 10, 10);
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
ind = PDF.AddImageFromFile("ClipBoard_IE.gif")
PDF.TransformImage ind, 0 'ImageTransformation.itFlip
PDF.TransformImage ind, 1 'ImageTransformation.itNegative
PDF.ShowImage ind, 10, 10
PDF.SaveToFile "test.pdf", true

See Also

Reference