Home/ Reference/ Bitmap

bitmap.SaveAs(FileName, Filter)

Writes the bitmap out to its own file. Batch image extraction, sending a client a single photo. Pass a full path.

Signature

bitmap.SaveAs(FileName, Filter)

Notes

Writes the bitmap out to its own file. Batch image extraction, sending a client a single photo. Pass a full path.

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
    try:
        bmp.SaveAs("D:/images/export_01.jpg", 1)         # 1 = the JPEG filter code
        print("Saved")
    except Exception as e:
        print("Save failed: ", e)

About this section: Bitmap

Bitmap — raster image handling.

Other entries in this section