Home/ Reference/ Bitmap

shape.ApplyEffectInvert() / ApplyEffectGamma() / ApplyEffectPosterize()

Applies color adjustments to a bitmap: invert, gamma, posterize. These are methods on Shape, not on Bitmap — don't go looking on the wrong object.

Signature

shape.ApplyEffectInvert() / ApplyEffectGamma() / ApplyEffectPosterize()

Notes

Applies color adjustments to a bitmap: invert, gamma, posterize. These are methods on Shape, not on Bitmap — don't go looking on the wrong object.

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:
    try:
        shape.ApplyEffectInvert()                   # invert
        print("Inverted")
    except Exception as e:
        print("Invert failed: ", e)

    try:
        shape.ApplyEffectPosterize()                # posterise
        print("Posterised")
    except Exception as e:
        print("Posterise failed: ", e)

About this section: Bitmap

Bitmap — raster image handling.

Other entries in this section