Home/ Reference/ Bitmap

bitmap.ResolutionX / ResolutionY

Horizontal and vertical resolution in dpi. 300 is the floor for print; below 200 it will look soft. Get these two wrong and the rest of the layout work is wasted.

Signature

bitmap.ResolutionX / ResolutionY

Notes

Horizontal and vertical resolution in dpi. 300 is the floor for print; below 200 it will look soft. Get these two wrong and the rest of the layout work is wasted.

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("Resolution: ", bmp.ResolutionX, "x", bmp.ResolutionY, "dpi")

    if bmp.ResolutionX < 300:
        print("WARNING: too low for print, resample to 300dpi")

About this section: Bitmap

Bitmap — raster image handling.

Other entries in this section