Add Images in the page. More...

Data Structures

struct  A3DPDFImageData
 A3DPDFImageData structure. More...
 

Enumerations

enum  A3DPDFEImageFormat {
  kA3DPDFImageFormatUnknown,
  kA3DPDFImageFormatBmp,
  kA3DPDFImageFormatPng,
  kA3DPDFImageFormatJpg,
  kA3DPDFImageFormatBitmapRgbByte,
  kA3DPDFImageFormatBitmapRgbaByte,
  kA3DPDFImageFormatBitmapGreyByte,
  kA3DPDFImageFormatBitmapGreyaByte,
  kA3DPDFImageFormatEmf,
  kA3DPDFImageFormatUrl,
  kA3DPDFImageFormatGif,
  kA3DPDFImageFormatTif,
  kA3DPDFImageFormatPcx,
  kA3DPDFImageFormatTga,
  kA3DPDFImageFormatPpm,
  kA3DPDFImageFormatIlbm,
  kA3DPDFImageFormatCel,
  kA3DPDFImageFormatRgb,
  kA3DPDFImageFormatPsd,
  kA3DPDFImageFormatSoftimagepic
}
 The following image formats are available in HOOPS. More...
 

Functions

A3DStatus A3DPDFImageCreate (A3DPDFDocument *pDoc, const A3DPDFImageData *pImageData, A3DPDFImage **ppImage)
 Function to create a picture image object. More...
 
A3DStatus A3DPDFImageCreateFromFile (A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DPDFEImageFormat eFormat, A3DPDFImage **ppImage)
 Function to create an image object from a file. More...
 
A3DStatus A3DPDFImageCreateFromStream (A3DPDFDocument *pDoc, const A3DUTF8Char *pcStream, const A3DInt32 iLengthStream, const A3DPDFEImageFormat eFormat, A3DPDFImage **ppImage)
 Function to create an image object from a file. More...
 
A3DStatus A3DPDFPageInsertImage (A3DPDFPage *pPage, A3DPDFImage *pImage, const A3DInt32 iPosLeft, const A3DInt32 iPosBottom)
 Function to insert a static image in a page. With this, an image is positionned on a page but can not be used for interactivity. More...
 
A3DStatus A3DPDFPageInsertImage2 (A3DPDFPage *pPage, A3DPDFImage *pImage, const A3DPDFRectData *pRectData)
 Function to insert a static image in a page. With this, an image is positionned on a page but can not be used for interactivity. More...
 

Detailed Description

Add Images in the page.

This module describes the functions and structures that allow you to add images in the page. These images can only be added on a page, and cannot be retrieved from an existing page.

An image can be used as a static image to be inserted on a page at a specific position. Use A3DPDFPageInsertImage2 for positionning such an image on a page. Also, an image can be stored as an icon in the document, and then be used for interactivity.

Enumeration Type Documentation

◆ A3DPDFEImageFormat

The following image formats are available in HOOPS.

Remarks
EMF is only supported on Windows.
Starting from version 2020, some of these formats are not supported anymore. These are Cel, ILBM, PSD, PCX and TIFF.
See also
A3DPDFImageData
A3DPDFImageCreateFromStream
A3DPDFImageCreateFromFile
A3DPDFDocumentExportAsImage
A3DPDFDocumentExportAsImage
Version
4.1
Enumerator
kA3DPDFImageFormatUnknown 

Undefined format

kA3DPDFImageFormatBmp 

BMP format

kA3DPDFImageFormatPng 

PNG format

kA3DPDFImageFormatJpg 

JPEG format

kA3DPDFImageFormatBitmapRgbByte 

Bitmap RGB format

kA3DPDFImageFormatBitmapRgbaByte 

Bitmap RGBA format

kA3DPDFImageFormatBitmapGreyByte 

Bitmap grey format

kA3DPDFImageFormatBitmapGreyaByte 

Bitmap greya format

kA3DPDFImageFormatEmf 

EMF format, Windows only

kA3DPDFImageFormatUrl 

URL format

kA3DPDFImageFormatGif 

GIF format

kA3DPDFImageFormatTif 

TIFF format, unsupported

kA3DPDFImageFormatPcx 

PCX format, unsupported

kA3DPDFImageFormatTga 

TGA format

kA3DPDFImageFormatPpm 

PPM format

kA3DPDFImageFormatIlbm 

ILBM format, unsupported

kA3DPDFImageFormatCel 

Cel format, unsupported

kA3DPDFImageFormatRgb 

RGB format

kA3DPDFImageFormatPsd 

PSD format, unsupported

kA3DPDFImageFormatSoftimagepic 

Softimagepic format

Function Documentation

◆ A3DPDFImageCreate()

A3DStatus A3DPDFImageCreate ( A3DPDFDocument pDoc,
const A3DPDFImageData pImageData,
A3DPDFImage **  ppImage 
)

Function to create a picture image object.

Deprecated:
This method is deprecated. Please use A3DPDFImageCreateFromFile or A3DPDFImageCreateFromStream instead.

The image object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertImage.

Parameters
[in,out]pDocThe Document object to work with.
[in]pImageDataThe image parameters.
[out]ppImageThe Image object created.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
4.1

◆ A3DPDFImageCreateFromFile()

A3DStatus A3DPDFImageCreateFromFile ( A3DPDFDocument pDoc,
const A3DUTF8Char pcFileName,
const A3DPDFEImageFormat  eFormat,
A3DPDFImage **  ppImage 
)

Function to create an image object from a file.

The image object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertImage2.

Parameters
[in,out]pDocThe Document object to work with.
[in]pcFileNameFile name of the image file.
[in]eFormatFormat of the image. If kA3DPDFImageFormatUnknown, the format is deducted from file extension.
[out]ppImageThe Image object created.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
10.2

◆ A3DPDFImageCreateFromStream()

A3DStatus A3DPDFImageCreateFromStream ( A3DPDFDocument pDoc,
const A3DUTF8Char pcStream,
const A3DInt32  iLengthStream,
const A3DPDFEImageFormat  eFormat,
A3DPDFImage **  ppImage 
)

Function to create an image object from a file.

The image object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertImage2.

Parameters
[in,out]pDocThe Document object to work with.
[in]pcStreamThe buffer.
[in]iLengthStreamThe length of the buffer.
[in]eFormatFormat of the image. It is mandatory to be specified for a buffer.
[out]ppImageThe Image object created.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
10.2

◆ A3DPDFPageInsertImage()

A3DStatus A3DPDFPageInsertImage ( A3DPDFPage pPage,
A3DPDFImage pImage,
const A3DInt32  iPosLeft,
const A3DInt32  iPosBottom 
)

Function to insert a static image in a page. With this, an image is positionned on a page but can not be used for interactivity.

Deprecated:
This function is deprecated. Please use A3DPDFPageInsertImage2 instead.
Parameters
[in,out]pPageThe Page object to work with.
[in]pImageThe Image object to insert on the page.
[in]iPosLeftThe x coordinate of the insertion point of the image. The insertion point is the bottom left corner of the image. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
[in]iPosBottomThe y coordinate of the insertion point of the image. The insertion point is the bottom left corner of the image. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
4.1

◆ A3DPDFPageInsertImage2()

A3DStatus A3DPDFPageInsertImage2 ( A3DPDFPage pPage,
A3DPDFImage pImage,
const A3DPDFRectData pRectData 
)

Function to insert a static image in a page. With this, an image is positionned on a page but can not be used for interactivity.

Parameters
[in,out]pPageThe Page object to work with.
[in]pImageThe Image object to insert on the page.
[in]pRectDataThe rectangle to specify the position on the page.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
10.2