ImageDef

class ImageDef(DXFObject)

Introduced in DXF version R13 (AC1012), dxftype is IMAGEDEF.

ImageDef defines an image, which can be placed by the Image entity. Create ImageDef by the Drawing factory function add_image_def().

DXF Attributes for ImageDef

ImageDef.dxf.filename

Relative (to the DXF file) or absolute path to the image file as string

ImageDef.dxf.image_size

Image size in pixel as (x, y) tuple

ImageDef.dxf.pixel_size

Default size of one pixel in AutoCAD units (x, y) tuple

ImageDef.dxf.loaded

Default = 1

ImageDef.dxf.resolution_units
  • 0 = No units
  • 2 = Centimeters
  • 5 = Inch
  • default is 0