IGraphicImage

class IGraphicImage

Bases: ImpactCOMWrapperBase

Summary:

Represents an image that can be used to create a graphic entity.

Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance

property compression

Gets Compression.

Summary:

Gets a string representing the compression of the image (if any).

Returns:

The value of Compression.

Return type:

compression (str)

property document

Gets Document.

Summary:

Returns the IDocument associated with the graphic image.

Remarks:

If the graphic image is associated with a customer or project IDocument this property returns it, otherwise NULL.

Returns:

The value of Document.

Return type:

document (IDocument)

property embedded

Gets Embedded.

Summary:

Indicates if the image is an embedded image or not.

Returns:

The value of Embedded.

Return type:

embedded (bool)

property embedded_size

Gets embedded_size.

Summary:

Gets the embedded size of the image.

Remarks:

If the image is not embedded this property returns 0.

Returns:

The value of embedded_size.

Return type:

embedded_size (int)

property file_name

Gets file_name.

Summary:

Gets the file name of the image.

Remarks:

If the image is embedded this property returns an emtpy string.

Returns:

The value of file_name.

Return type:

file_name (str)

property file_size

Gets file_size.

Summary:

Gets the file size of the image.

Remarks:

If the image is embedded this property returns 0.

Returns:

The value of file_size.

Return type:

file_size (int)

property height

Gets Height.

Summary:

Gets the height (in pixels) of the image.

Returns:

The value of Height.

Return type:

height (int)

property reference_count

Gets reference_count.

Summary:

Gets the number of entities that reference this image.

Returns:

The value of reference_count.

Return type:

reference_count (int)

property type

Gets Type.

Summary:

Gets the type of the image (bitmap, jpeg, etc.).

Returns:

The value of Type.

Return type:

type (str)

property width

Gets Width.

Summary:

Gets the width (in pixels) of the image.

Returns:

The value of Width.

Return type:

width (int)

embed()
Summary:

Embeds the image in the drawing.

export(file_name)
Summary:

Exports the image to a file.

Remarks:

The file format is implied by the file extension extracted from the file_name method parameter.

Parameters:

file_name (str) – Specifies the file to export to.

export2(file_name, image_format_params)
Summary:

Exports the image to a file.

Remarks:

The file format is implied by the file extension extracted from the file_name method parameter.

Parameters:
  • file_name (str) – Specifies the file to export to.

  • image_format_params (IImageFormatParams) – Specifies the IImageFormatParams options for the image file.

export_to_stream(image_format_params)
Summary:

Exports the image to a stream.

Returns:

This method returns an IUnknown interface but the interface also supports the IStream interface. Note that VBScript does not support streaming.

Parameters:

image_format_params (IImageFormatParams) – Specifies the IImageFormatParams options for the image file.

extract(file_name)
Summary:

Extracts the image to a file.

Remarks:

If the image is not embedded this method does nothing.

Parameters:

file_name (str) – Specifies the file to extract the image to.

extract2(file_name, image_format_params)
Summary:

Extracts the image to a file.

Remarks:

If the image is not embedded this method does nothing.

Parameters:
  • file_name (str) – Specifies the file to extract the image to.

  • image_format_params (IImageFormatParams) – Specifies the IImageFormatParams options for the image file.

isNone()

Checks if the COM object is None. This is useful for determining if the wrapper has been initialized with a valid COM object.

reload()
Summary:

Reloads the image from file.

Remarks:

If the image is embedded this method does nothing.

Examples