Home/ Reference/ Bitmap

bitmap.Mode

Color mode (CMYK, RGB, grayscale, bitmap and so on). The first thing to check in a preflight. Read-only; change it with ConvertTo.

Signature

bitmap.Mode

Notes

Color mode (CMYK, RGB, grayscale, bitmap and so on). The first thing to check in a preflight. Read-only; change it with ConvertTo.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shape = app.ActiveSelectionRange(1)

if shape.Type == 5:
    bmp = shape.Bitmap
    print("Colour mode code: ", bmp.Mode)
    print("Linked: ", bmp.ExternallyLinked)
    if bmp.ExternallyLinked:
        print("Linked file: ", bmp.LinkFileName)

About this section: Bitmap

Bitmap — raster image handling.

Other entries in this section