GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide

The reference we all need, compiled from the GIMP API and GIMP itself

Stylised GIMP logo
Contents
24mn read

GIMP Python enums, and more

If you’re developing plug-ins or scripts for GIMP 3, one of the most frustrating challenges is tracking down the correct enum values for Python’s gi-​repository, Gimp module or Script-Fu procedures.

The official GIMP 3 API documentation is written primarily for C developers. Until now, Python plug-in authors and Script-Fu scripters had to piece together enum values from source code, forum posts, and trial and error.

This reference compiles every enum available in GIMP 3.0 and later into a single, searchable resource. It’s collected directly from a live GIMP 3.0.8 instance to guarantee accuracy.

Structure of this reference documentation

Each table is sorted alphabetically and includes five columns, with a sixth for Gimp.LayerMode:

UI NameThe human-readable label as it appears in GIMP’s interface, useful for cross-referencing with what you see on screen.
Code NameThe uppercase identifier used internally by GIMP and in the PDB (Procedural Database). It’s the form most commonly seen in C documentation. If you’re porting code from GIMP 2.x Script-Fu scripts, or following examples from the C documentation, the code name is the form you’re most likely to encounter. Python plug-in developers should ignore it in favour of the python enum column. Even so, it’s useful for cross-referencing with the official docs and the GIMP Procedure Browser (Help > Procedure Browser).
Integer ValueThe raw numeric value of the enum, useful when debugging or working with legacy Script-Fu code that passes modes as numbers.
Python EnumWhat you use in your GIMP 3 Python plug-ins. For example Gimp.LayerMode.NORMAL or Gimp.FillType.TRANSPARENT.
GEGL NicknameThe lowercase identifier used by GIMP’s underlying GEGL graphics engine, primarily useful for serialisation and config file work.
GEGL OperationFor Gimp.LayerMode only, GEGL Nicknamethe GEGL Operation column shows the full operation string used when working directly with GEGL layer compositing.

Note: Some values use hyphens as separators (e.g. ABSOLUTE-COLORIMETRIC) while others use underscores (e.g. BLACK_POINT_COMPENSATION). This is an inconsistency in GIMP’s own C codebase rather than an error in this reference. The code names are derived directly from the GEGL nickname. Also, different enums may have been registered by different developers at different times following slightly different naming conventions.

How this reference was compiled

All of the data in this reference was generated using a Python script that inspects the live GIMP module directly using GIMP’s built-in Python-Fu console. So the values are guaranteed to reflect your exact installed version rather than outdated documentation.

The script is available as a free download. Simply paste it into the Python-Fu console in your own GIMP 3 installation (Filters > Development > Python-Fu > Python Console). It will generate the complete enum listing for any future GIMP 3 release. This makes it easy to check for new or changed enum values as GIMP continues to develop.

Gimp.AddMaskType

Controls how a new layer mask is initialised when added to a layer. For example, WHITE makes the full layer visible; BLACK hides it entirely; SELECTION initialises the mask from the current selection.

UI nameCode nameInteger valuePython enumGEGL nickname
AlphaALPHA2Gimp.AddMaskType.ALPHAalpha
Alpha TransferALPHA-​TRANSFER3Gimp.AddMaskType.ALPHA_​TRANSFERalpha-transfer
BlackBLACK1Gimp.AddMaskType.BLACKblack
ChannelCHANNEL6Gimp.AddMaskType.CHANNELchannel
CopyCOPY5Gimp.AddMaskType.COPYcopy
SelectionSELECTION4Gimp.AddMaskType.SELECTIONselection
WhiteWHITE0Gimp.AddMaskType.WHITEwhite

Gimp.​ArgumentSync

Controls whether a plug-in’s argument values are automatically saved and restored between sessions. PARASITE syncs the value via a GIMP parasite (persistent storage); NONE means no syncing.

UI nameCode nameInteger valuePython enumGEGL nickname
NoneNONE0Gimp.ArgumentSync.NONEnone
ParasitePARASITE1Gimp.ArgumentSync.​PARASITEparasite

Gimp.BrushApplicationMode

Determines whether a brush is applied with a hard edge (HARD) or with its built-in softness/opacity falloff (SOFT).

UI nameCode nameInteger valuePython enumGEGL nickname
HardHARD0Gimp.BrushApplicationMode.HARDhard
SoftSOFT1Gimp.BrushApplicationMode.SOFTsoft

Gimp.BrushGeneratedShape

The geometric shape used when generating a procedural brush: circle, square, or diamond.

UI nameCode nameInteger valuePython enumGEGL nickname
CircleCIRCLE0Gimp.BrushGeneratedShape.CIRCLEcircle
DiamondDIAMOND2Gimp.BrushGeneratedShape.DIAMONDdiamond
SquareSQUARE1Gimp.BrushGeneratedShape.SQUAREsquare

Gimp.CapStyle

The style applied to the ends of stroked lines: flat (BUTT), rounded (ROUND), or square extending past the endpoint (SQUARE).

UI nameCode nameInteger valuePython enumGEGL nickname
ButtBUTT0Gimp.CapStyle.BUTTbutt
RoundROUND1Gimp.CapStyle.ROUNDround
SquareSQUARE2Gimp.CapStyle.SQUAREsquare

Gimp.ChannelOps

How a selection or channel is combined with an existing selection: add to, subtract from, replace, or intersect with the current selection.

UI nameCode nameInteger valuePython enumGEGL nickname
AddADD0Gimp.ChannelOps.ADDadd
IntersectINTERSECT3Gimp.ChannelOps.INTERSECTintersect
ReplaceREPLACE2Gimp.ChannelOps.REPLACEreplace
SubtractSUBTRACT1Gimp.ChannelOps.SUBTRACTsubtract

Gimp.ChannelType

Identifies a specific colour or alpha channel component within a drawable (red, green, blue, gray, alpha, or indexed).

UI nameCode nameInteger valuePython enumGEGL nickname
AlphaALPHA5Gimp.ChannelType.ALPHAalpha
BlueBLUE2Gimp.ChannelType.BLUEblue
GrayGRAY3Gimp.ChannelType.GRAYgray
GreenGREEN1Gimp.ChannelType.GREENgreen
IndexedINDEXED4Gimp.ChannelType.INDEXEDindexed
RedRED0Gimp.ChannelType.REDred

Gimp.CheckSize

The size of the checkerboard pattern used in the canvas to indicate transparent areas.

UI nameCode nameInteger valuePython enumGEGL nickname
Large ChecksLARGE-CHECKS2Gimp.CheckSize.LARGE_CHECKSlarge-checks
Medium ChecksMEDIUM-CHECKS1Gimp.CheckSize.MEDIUM_CHECKSmedium-checks
Small ChecksSMALL-CHECKS0Gimp.CheckSize.SMALL_CHECKSsmall-checks

Gimp.CheckType

The colour scheme of the transparency checkerboard. Useful when your image colours make the default grey checks hard to see.

UI nameCode nameInteger valuePython enumGEGL nickname
Black OnlyBLACK-ONLY5Gimp.CheckType.BLACK_ONLYblack-only
Custom ChecksCUSTOM-CHECKS6Gimp.CheckType.CUSTOM_CHECKSCustom-checks
Dark ChecksDARK-CHECKS2Gimp.CheckType.DARK_CHECKSdark-checks
Gray ChecksGRAY-CHECKS1Gimp.CheckType.GRAY_CHECKSgray-checks
Gray OnlyGRAY-ONLY4Gimp.CheckType.GRAY_ONLYgray-only
Light ChecksLIGHT-CHECKS0Gimp.CheckType.LIGHT_CHECKSlight-checks
White OnlyWHITE-ONLY3Gimp.CheckType.WHITE_ONLYwhite-only

Gimp.CloneType

The source used by the Clone tool: either another area of an image (IMAGE) or a named pattern (PATTERN).

UI nameCode nameInteger valuePython enumGEGL nickname
ImageIMAGE0Gimp.CloneType.IMAGEimage
PatternPATTERN1Gimp.CloneType.PATTERNpattern

Gimp.ColorManagementMode

Whether colour management is disabled (OFF), applied for accurate screen display (DISPLAY), or used to simulate output on another device (SOFTPROOF).

UI nameCode nameInteger valuePython enumGEGL nickname
DisplayDISPLAY1Gimp.ColorManagementMode.DISPLAYdisplay
OffOFF0Gimp.ColorManagementMode.OFFoff
Soft ProofSOFTPROOF2Gimp.ColorManagementMode.SOFTPROOFsoftproof

Gimp.ColorRenderingIntent

The method used to map colours when converting between colour spaces with different gamuts. PERCEPTUAL is generally best for photos; RELATIVE_COLORIMETRIC with black point compensation is common for print.

UI nameCode nameInteger valuePython enumGEGL nickname
Absolute ColorimetricABSOLUTE-COLORIMETRIC3Gimp.​ColorRenderingIntent.ABSOLUTE_COLORIMETRICabsolute-colorimetric
PerceptualPERCEPTUAL0Gimp.ColorRenderingIntent.PERCEPTUALperceptual
Relative ColorimetricRELATIVE-COLORIMETRIC1Gimp.ColorRenderingIntent.RELATIVE_COLORIMETRICrelative-colorimetric
SaturationSATURATION2Gimp.ColorRenderingIntent.SATURATIONsaturation

Gimp.ColorTag

A colour label that can be assigned to layers or channels in the Layers panel, useful for visual organisation.

UI nameCode nameInteger valuePython enumGEGL nickname
BlueBLUE1Gimp.ColorTag.BLUEblue
BrownBROWN5Gimp.ColorTag.BROWNbrown
GrayGRAY8Gimp.ColorTag.GRAYgray
GreenGREEN2Gimp.ColorTag.GREENgreen
NoneNONE0Gimp.ColorTag.NONEnone
OrangeORANGE4Gimp.ColorTag.ORANGEorange
RedRED6Gimp.ColorTag.REDred
VioletVIOLET7Gimp.ColorTag.VIOLETviolet
YellowYELLOW3Gimp.ColorTag.YELLOWyellow

Gimp.ColorTransformFlags

Flags that modify the behaviour of a GimpColorTransform. Use BLACK_POINT_COMPENSATION to improve shadow detail in profile conversions; GAMUT_CHECK highlights out-of-gamut colours; NOOPTIMIZE disables speed optimisations (useful for debugging).

UI nameCode nameInteger valuePython enumGEGL nickname
Black Point CompensationBLACK_​POINT_​COMPENSATION8192Gimp.ColorTransformFlags.​BLACK_POINT_COMPENSATIONblack_point_compensation
Gamut CheckGAMUT_CHECK4096Gimp.ColorTransformFlags.​GAMUT_CHECKgamut_check
No OptimizeNOOPTIMIZE256Gimp.ColorTransformFlags.​NOOPTIMIZEnooptimize

Gimp.​ComponentType

The data type used to store each channel value in an image: 8-bit integer (U8) through to 64-bit double-precision float (DOUBLE). Determines bit depth and precision.

UI nameCode nameInteger valuePython enumGEGL nickname
DoubleDOUBLE700Gimp.​ComponentType.​DOUBLEdouble
FloatFLOAT600Gimp.​ComponentType.​FLOATfloat
HalfHALF500Gimp.​ComponentType.​HALFhalf
U16U16200Gimp.​ComponentType.​U16u16
U32U32300Gimp.​ComponentType.​U32u32
U8U8100Gimp.​ComponentType.​U8u8

Gimp.​ConfigError

Error codes returned when reading or writing GIMP configuration files. Useful when catching GError exceptions around config I/O operations.

UI nameCode nameInteger valuePython enumGEGL nickname
OpenOPEN0Gimp.​ConfigError.​OPENopen
Open ENOENTOPEN_​ENOENT1Gimp.​ConfigError.​OPEN_​ENOENTopen_​enoent
ParsePARSE3Gimp.​ConfigError.​PARSEparse
VersionVERSION4Gimp.​ConfigError.​VERSIONversion
WriteWRITE2Gimp.​ConfigError.​WRITEwrite

Gimp.​ConfigPathType

Classifies a configuration file path as pointing to a single file, a single directory, or a searchpath list of either.

UI nameCode nameInteger valuePython enumGEGL nickname
DirDIR2Gimp.​ConfigPathType.​DIRdir
Dir ListDIR_​LIST3Gimp.​ConfigPathType.​DIR_​LISTdir_​list
FileFILE0Gimp.​ConfigPathType.​FILEfile
File ListFILE_​LIST1Gimp.​ConfigPathType.​FILE_​LISTfile_​list

Gimp.​ConvertDitherType

The dithering algorithm used when converting a colour image to indexed mode. NONE is fastest; Floyd-Steinberg variants (FS, FS_LOWBLEED) give better results at the cost of speed.

UI nameCode nameInteger valuePython enumGEGL nickname
FixedFIXED3Gimp.​ConvertDitherType.​FIXEDfixed
FSFS1Gimp.​ConvertDitherType.​FSfs
FS Low BleedFS-LOWBLEED2Gimp.​ConvertDitherType.​FS_​LOWBLEEDfs-lowbleed
NoneNONE0Gimp.​ConvertDitherType.​NONEnone

Gimp.​ConvertPaletteType

The palette to use when converting to indexed colour mode: auto-generated optimal palette (GENERATE), web-safe colours (WEB), black-and-white (MONO), or a named custom palette (CUSTOM).

UI nameCode nameInteger valuePython enumGEGL nickname
CustomCUSTOM3Gimp.​ConvertPaletteType.​CUSTOMcustom
GenerateGENERATE0Gimp.​ConvertPaletteType.​GENERATEgenerate
MonoMONO2Gimp.​ConvertPaletteType.​MONOmono
WebWEB1Gimp.​ConvertPaletteType.​WEBweb

Gimp.​ConvolveType

Whether a convolution operation blurs (BLUR) or sharpens (SHARPEN) the drawable.

UI nameCode nameInteger valuePython enumGEGL nickname
BlurBLUR0Gimp.​ConvolveType.​BLURblur
SharpenSHARPEN1Gimp.​ConvolveType.​SHARPENsharpen

Gimp.​CpuAccelFlags

Flags indicating which CPU instruction set extensions are available at runtime (SSE, AVX, AltiVec, etc.). Used internally by GIMP and GEGL for performance optimisation; rarely needed directly in plug-ins.

UI nameCode nameInteger valuePython enumGEGL nickname
NoneNONE0Gimp.​CpuAccelFlags.​NONEnone
PPC AltiVecPPC_​ALTIVEC67108864Gimp.​CpuAccelFlags.​PPC_​ALTIVECppc_​altivec
x86 3DNowX86_​3DNOW1073741824Gimp.​CpuAccelFlags.​X86_​3DNOWx86_​3dnow
x86 AVXX86_​AVX2097152Gimp.​CpuAccelFlags.​X86_​AVXx86_​avx
x86 MMXX86_​MMX-2147483648Gimp.​CpuAccelFlags.​X86_​MMXx86_​mmx
x86 MMX ExtX86_​MMXEXT536870912Gimp.​CpuAccelFlags.​X86_​MMXEXTx86_​mmxext
x86 SSEX86_​SSE268435456Gimp.​CpuAccelFlags.​X86_​SSEx86_​sse
x86 SSE2X86_​SSE2134217728Gimp.​CpuAccelFlags.​X86_​SSE2x86_​sse2
x86 SSE3X86_​SSE333554432Gimp.​CpuAccelFlags.​X86_​SSE3x86_​sse3
x86 SSE4.​1X86_​SSE4_​18388608Gimp.​CpuAccelFlags.​X86_​SSE4_​1x86_​sse4_​1
x86 SSE4.​2X86_​SSE4_​24194304Gimp.​CpuAccelFlags.​X86_​SSE4_​2x86_​sse4_​2
x86 SSSE3X86_​SSSE316777216Gimp.​CpuAccelFlags.​X86_​SSSE3x86_​ssse3

Gimp.​DesaturateMode

The algorithm used when converting a colour layer to greyscale. LUMA is perceptually accurate and usually the best default; LUMINANCE operates in linear light.

UI nameCode nameInteger valuePython enumGEGL nickname
AverageAVERAGE2Gimp.​DesaturateMode.​AVERAGEaverage
LightnessLIGHTNESS0Gimp.​DesaturateMode.​LIGHTNESSlightness
LumaLUMA1Gimp.​DesaturateMode.​LUMAluma
LuminanceLUMINANCE3Gimp.​DesaturateMode.​LUMINANCEluminance
ValueVALUE4Gimp.​DesaturateMode.​VALUEvalue

Gimp.​DodgeBurnType

Selects whether a dodge/burn operation lightens (DODGE) or darkens (BURN) the affected pixels.

UI nameCode nameInteger valuePython enumGEGL nickname
BurnBURN1Gimp.​DodgeBurnType.​BURNburn
DodgeDODGE0Gimp.​DodgeBurnType.​DODGEdodge

Gimp.​ExportReturn

The return value from Gimp.ExportOptions.get_image(), indicating whether the image needs to be exported/flattened (EXPORT) or can be used as-is (IGNORE).

UI nameCode nameInteger valuePython enumGEGL nickname
ExportEXPORT1Gimp.​ExportReturn.​EXPORTexport
IgnoreIGNORE0Gimp.​ExportReturn.​IGNOREignore

Gimp.​FileChooserAction

Specifies what kind of file system item a file chooser dialog should select: a file to open, a save location, a folder, or a new folder. Maps directly to GtkFileChooserAction.

UI nameCode nameInteger valuePython enumGEGL nickname
AnyANY-1Gimp.​FileChooserAction.​ANYany
Create FolderCREATE-FOLDER3Gimp.​FileChooserAction.​CREATE_​FOLDERcreate-folder
OpenOPEN0Gimp.​FileChooserAction.​OPENopen
SaveSAVE1Gimp.​FileChooserAction.​SAVEsave
Select FolderSELECT-FOLDER2Gimp.​FileChooserAction.​SELECT_​FOLDERselect-folder

Gimp.​FillType

The fill content used when filling a selection, layer, or new layer: foreground colour, background colour, white, CIELab middle grey, a pattern, or transparent.

UI nameCode nameInteger valuePython enumGEGL nickname
BackgroundBACKGROUND1Gimp.​FillType.​BACKGROUNDbackground
CIELab Middle GrayCIELAB-MIDDLE-GRAY2Gimp.​FillType.​CIELAB_​MIDDLE_​GRAYcielab-middle-gray
ForegroundFOREGROUND0Gimp.​FillType.​FOREGROUNDforeground
PatternPATTERN5Gimp.​FillType.​PATTERNpattern
TransparentTRANSPARENT4Gimp.​FillType.​TRANSPARENTtransparent
WhiteWHITE3Gimp.​FillType.​WHITEwhite

Gimp.​ForegroundExtractMode

The engine used for foreground extraction (separating a subject from its background). Currently only MATTING is available.

UI nameCode nameInteger valuePython enumGEGL nickname
MattingMATTING0Gimp.​ForegroundExtractMode.​MATTINGmatting

Gimp.​GradientBlendColorSpace

The colour space in which gradient colours are interpolated between stops. RGB_PERCEPTUAL is the typical default; CIE_LAB can give more visually even blends.

UI nameCode nameInteger valuePython enumGEGL nickname
CIE LabCIE-LAB2Gimp.​GradientBlendColorSpace.​CIE_​LABcie-lab
RGB LinearRGB-LINEAR1Gimp.​GradientBlendColorSpace.​RGB_​LINEARrgb-linear
RGB PerceptualRGB-PERCEPTUAL0Gimp.​GradientBlendColorSpace.​RGB_​PERCEPTUALrgb-perceptual

Gimp.​GradientSegmentColor

The colour model used for interpolation within a single gradient segment: linear RGB, or HSV going clockwise or counter-clockwise around the colour wheel.

UI nameCode nameInteger valuePython enumGEGL nickname
HSV CCWHSV-CCW1Gimp.​GradientSegmentColor.​HSV_​CCWhsv-ccw
HSV CWHSV-CW2Gimp.​GradientSegmentColor.​HSV_​CWhsv-cw
RGBRGB0Gimp.​GradientSegmentColor.​RGBrgb

Gimp.​GradientSegmentType

The mathematical transition curve applied within a gradient segment (linear, curved, sinusoidal, etc.).

UI nameCode nameInteger valuePython enumGEGL nickname
CurvedCURVED1Gimp.​GradientSegmentType.​CURVEDcurved
LinearLINEAR0Gimp.​GradientSegmentType.​LINEARlinear
SineSINE2Gimp.​GradientSegmentType.​SINEsine
Sphere DecreasingSPHERE-DECREASING4Gimp.​GradientSegmentType.​SPHERE_​DECREASINGsphere-decreasing
Sphere IncreasingSPHERE-INCREASING3Gimp.​GradientSegmentType.​SPHERE_​INCREASINGsphere-increasing
StepSTEP5Gimp.​GradientSegmentType.​STEPstep

Gimp.​GradientType

The geometric shape of a gradient fill: linear, radial, conical, square, shapeburst, or spiral.

UI nameCode nameInteger valuePython enumGEGL nickname
BilinearBILINEAR1Gimp.​GradientType.​BILINEARbilinear
Conical AsymmetricCONICAL-ASYMMETRIC5Gimp.​GradientType.​CONICAL_​ASYMMETRICconical-asymmetric
Conical SymmetricCONICAL-SYMMETRIC4Gimp.​GradientType.​CONICAL_​SYMMETRICconical-symmetric
LinearLINEAR0Gimp.​GradientType.​LINEARlinear
RadialRADIAL2Gimp.​GradientType.​RADIALradial
Shapeburst AngularSHAPEBURST-ANGULAR6Gimp.​GradientType.​SHAPEBURST_​ANGULARshapeburst-angular
Shapeburst DimpledSHAPEBURST-DIMPLED8Gimp.​GradientType.​SHAPEBURST_​DIMPLEDshapeburst-dimpled
Shapeburst SphericalSHAPEBURST-SPHERICAL7Gimp.​GradientType.​SHAPEBURST_​SPHERICALshapeburst-spherical
Spiral AnticlockwiseSPIRAL-ANTICLOCKWISE10Gimp.​GradientType.​SPIRAL_​ANTICLOCKWISEspiral-anticlockwise
Spiral ClockwiseSPIRAL-CLOCKWISE9Gimp.​GradientType.​SPIRAL_​CLOCKWISEspiral-clockwise
SquareSQUARE3Gimp.​GradientType.​SQUAREsquare

Gimp.​GridStyle

How the canvas grid is rendered: as dots, crosses at intersections, or various dash styles.

UI nameCode nameInteger valuePython enumGEGL nickname
DotsDOTS0Gimp.​GridStyle.​DOTSdots
Double DashDOUBLE-DASH3Gimp.​GridStyle.​DOUBLE_​DASHdouble-dash
IntersectionsINTERSECTIONS1Gimp.​GridStyle.​INTERSECTIONSintersections
On Off DashON-OFF-DASH2Gimp.​GridStyle.​ON_​OFF_​DASHon-off-dash
SolidSOLID4Gimp.​GridStyle.​SOLIDsolid

Gimp.​HistogramChannel

Which channel’s histogram to analyse or display: the composite value, or individual R/G/B/Alpha/Luminance channels.

UI nameCode nameInteger valuePython enumGEGL nickname
AlphaALPHA4Gimp.​HistogramChannel.​ALPHAalpha
BlueBLUE3Gimp.​HistogramChannel.​BLUEblue
GreenGREEN2Gimp.​HistogramChannel.​GREENgreen
LuminanceLUMINANCE5Gimp.​HistogramChannel.​LUMINANCEluminance
RedRED1Gimp.​HistogramChannel.​REDred
ValueVALUE0Gimp.​HistogramChannel.​VALUEvalue

Gimp.​HueRange

Specifies which range of hues is affected by hue/saturation adjustments: all colours, or a specific colour family (reds, yellows, greens, etc.).

UI nameCode nameInteger valuePython enumGEGL nickname
AllALL0Gimp.​HueRange.​ALLall
BlueBLUE5Gimp.​HueRange.​BLUEblue
CyanCYAN4Gimp.​HueRange.​CYANcyan
GreenGREEN3Gimp.​HueRange.​GREENgreen
MagentaMAGENTA6Gimp.​HueRange.​MAGENTAmagenta
RedRED1Gimp.​HueRange.​REDred
YellowYELLOW2Gimp.​HueRange.​YELLOWyellow

Gimp.​IconType

How a plug-in supplies its icon: as a named icon from the icon theme (ICON_NAME), a GdkPixbuf (PIXBUF), or an image file path (IMAGE_FILE).

UI nameCode nameInteger valuePython enumGEGL nickname
Icon NameICON-NAME0Gimp.​IconType.​ICON_​NAMEicon-name
Image FileIMAGE-FILE2Gimp.​IconType.​IMAGE_​FILEimage-file
PixbufPIXBUF1Gimp.​IconType.​PIXBUFpixbuf

Gimp.​ImageBaseType

The colour model of an image: RGB, GRAY (greyscale), or INDEXED. This is the top-level image mode, not the per-drawable type — see Gimp.ImageType for that.

UI nameCode nameInteger valuePython enumGEGL nickname
GrayGRAY1Gimp.​ImageBaseType.​GRAYgray
IndexedINDEXED2Gimp.​ImageBaseType.​INDEXEDindexed
RGBRGB0Gimp.​ImageBaseType.​RGBrgb

Gimp.​ImageType

The full drawable type including whether an alpha channel is present: e.g. RGB_IMAGE vs RGBA_IMAGE, GRAY_IMAGE vs GRAYA_IMAGE, etc.

UI nameCode nameInteger valuePython enumGEGL nickname
Gray ImageGRAY‐IMAGE2Gimp.​ImageType.​GRAY_​IMAGEgray‐image
GRAYA ImageGRAYA‐IMAGE3Gimp.​ImageType.​GRAYA_​IMAGEgraya‐image
Indexed ImageINDEXED‐IMAGE4Gimp.​ImageType.​INDEXED_​IMAGEindexed‐image
INDEXEDA ImageINDEXEDA‐IMAGE5Gimp.​ImageType.​INDEXEDA_​IMAGEindexeda‐image
RGB ImageRGB‐IMAGE0Gimp.​ImageType.​RGB_​IMAGErgb‐image
RGBA ImageRGBA‐IMAGE1Gimp.​ImageType.​RGBA_​IMAGErgba‐image

Gimp.​InkBlobType

The tip shape of the Ink tool: circle, square, or diamond.

UI nameCode nameInteger valuePython enumGEGL nickname
CircleCIRCLE0Gimp.​InkBlobType.​CIRCLEcircle
DiamondDIAMOND2Gimp.​InkBlobType.​DIAMONDdiamond
SquareSQUARE1Gimp.​InkBlobType.​SQUAREsquare

Gimp.​InterpolationType

The resampling algorithm used when scaling or transforming a drawable. CUBIC is a good general-purpose default; NOHALO and LOHALO give higher quality for downscaling.

UI nameCode nameInteger valuePython enumGEGL nickname
CubicCUBIC2Gimp.​InterpolationType.​CUBICcubic
LinearLINEAR1Gimp.​InterpolationType.​LINEARlinear
LoHaloLOHALO4Gimp.​InterpolationType.​LOHALOlohalo
NoHaloNOHALO3Gimp.​InterpolationType.​NOHALOnohalo
NoneNONE0Gimp.​InterpolationType.​NONEnone

Gimp.​JoinStyle

How the corners between two line segments are rendered when stroking: mitered (sharp point), rounded, or bevelled (flat cut).

UI nameCode nameInteger valuePython enumGEGL nickname
BevelBEVEL2Gimp.​JoinStyle.​BEVELbevel
MiterMITER0Gimp.​JoinStyle.​MITERmiter
RoundROUND1Gimp.​JoinStyle.​ROUNDround

Gimp.​LayerColorSpace

The colour space in which a layer’s blend mode is evaluated. AUTO lets GIMP choose; the others explicitly set linear, non-linear, perceptual RGB, or Lab blending.

UI nameCode nameInteger valuePython enumGEGL nickname
AutoAUTO0Gimp.​LayerColorSpace.​AUTOauto
LabLAB3Gimp.​LayerColorSpace.​LABlab
RGB LinearRGB‐LINEAR1Gimp.​LayerColorSpace.​RGB_​LINEARrgb‐linear
RGB Non LinearRGB‐NON‐LINEAR2Gimp.​LayerColorSpace.​RGB_​NON_​LINEARrgb‐non‐linear
RGB PerceptualRGB‐PERCEPTUAL4Gimp.​LayerColorSpace.​RGB_​PERCEPTUALrgb‐perceptual

Gimp.​LayerCompositeMode

Controls how the layer’s alpha channel is composited with the layers below it. AUTO is the correct default for almost all cases.

UI nameCode nameInteger valuePython enumGEGL nickname
AutoAUTO0Gimp.​LayerCompositeMode.​AUTOauto
Clip To BackdropCLIP‐TO‐BACKDROP2Gimp.​LayerCompositeMode.​CLIP_​TO_​BACKDROPclip‐to‐backdrop
Clip To LayerCLIP‐TO‐LAYER3Gimp.​LayerCompositeMode.​CLIP_​TO_​LAYERclip‐to‐layer
IntersectionINTERSECTION4Gimp.​LayerCompositeMode.​INTERSECTIONintersection
UnionUNION1Gimp.​LayerCompositeMode.​UNIONunion

Gimp.​LayerMode

The blend mode applied to a layer when compositing it with layers below. Includes all current modes and their legacy equivalents for compatibility with files created in GIMP 2.x. Prefer the non-legacy variants (e.g. NORMAL over NORMAL_LEGACY) for new work.

UI nameCode nameInteger valuePython enumGEGL nicknameGEGL Operation
AdditionADDITION33Gimp.​LayerMode.​ADDITIONadditionlayer‐mode:addition
Addition LegacyADDITION‐LEGACY7Gimp.​LayerMode.​ADDITION_​LEGACYaddition‐legacylayer‐mode:addition‐legacy
BehindBEHIND29Gimp.​LayerMode.​BEHINDbehindlayer‐mode:behind
Behind LegacyBEHIND‐LEGACY2Gimp.​LayerMode.​BEHIND_​LEGACYbehind‐legacylayer‐mode:behind‐legacy
BurnBURN43Gimp.​LayerMode.​BURNburnlayer‐mode:burn
Burn LegacyBURN‐LEGACY17Gimp.​LayerMode.​BURN_​LEGACYburn‐legacylayer‐mode:burn‐legacy
Color EraseCOLOR‐ERASE57Gimp.​LayerMode.​COLOR_​ERASEcolor‐eraselayer‐mode:color‐erase
Color Erase LegacyCOLOR‐ERASE‐LEGACY22Gimp.​LayerMode.​COLOR_​ERASE_​LEGACYcolor‐erase‐legacylayer‐mode:color‐erase‐legacy
Darken OnlyDARKEN‐ONLY35Gimp.​LayerMode.​DARKEN_​ONLYdarken‐onlylayer‐mode:darken‐only
Darken Only LegacyDARKEN‐ONLY‐LEGACY9Gimp.​LayerMode.​DARKEN_​ONLY_​LEGACYdarken‐only‐legacylayer‐mode:darken‐only‐legacy
DifferenceDIFFERENCE32Gimp.​LayerMode.​DIFFERENCEdifferencelayer‐mode:difference
Difference LegacyDIFFERENCE‐LEGACY6Gimp.​LayerMode.​DIFFERENCE_​LEGACYdifference‐legacylayer‐mode:difference‐legacy
DissolveDISSOLVE1Gimp.​LayerMode.​DISSOLVEdissolvelayer‐mode:dissolve
DivideDIVIDE41Gimp.​LayerMode.​DIVIDEdividelayer‐mode:divide
Divide LegacyDIVIDE‐LEGACY15Gimp.​LayerMode.​DIVIDE_​LEGACYdivide‐legacylayer‐mode:divide‐legacy
DodgeDODGE42Gimp.​LayerMode.​DODGEdodgelayer‐mode:dodge
Dodge LegacyDODGE‐LEGACY16Gimp.​LayerMode.​DODGE_​LEGACYdodge‐legacylayer‐mode:dodge‐legacy
EraseERASE58Gimp.​LayerMode.​ERASEeraselayer‐mode:erase
ExclusionEXCLUSION52Gimp.​LayerMode.​EXCLUSIONexclusionlayer‐mode:exclusion
Grain ExtractGRAIN‐EXTRACT46Gimp.​LayerMode.​GRAIN_​EXTRACTgrain‐extractlayer‐mode:grain‐extract
Grain Extract LegacyGRAIN‐EXTRACT‐LEGACY20Gimp.​LayerMode.​GRAIN_​EXTRACT_​LEGACYgrain‐extract‐legacylayer‐mode:grain‐extract‐legacy
Grain MergeGRAIN‐MERGE47Gimp.​LayerMode.​GRAIN_​MERGEgrain‐mergelayer‐mode:grain‐merge
Grain Merge LegacyGRAIN‐MERGE‐LEGACY21Gimp.​LayerMode.​GRAIN_​MERGE_​LEGACYgrain‐merge‐legacylayer‐mode:grain‐merge‐legacy
Hard LightHARDLIGHT44Gimp.​LayerMode.​HARDLIGHThardlightlayer‐mode:hardlight
Hard Light LegacyHARDLIGHT‐LEGACY18Gimp.​LayerMode.​HARDLIGHT_​LEGACYhardlight‐legacylayer‐mode:hardlight‐legacy
Hard MixHARD‐MIX51Gimp.​LayerMode.​HARD_​MIXhard‐mixlayer‐mode:hard‐mix
HSL ColorHSL‐COLOR39Gimp.​LayerMode.​HSL_​COLORhsl‐colorlayer‐mode:hsl‐color
HSL Color LegacyHSL‐COLOR‐LEGACY13Gimp.​LayerMode.​HSL_​COLOR_​LEGACYhsl‐color‐legacylayer‐mode:hsl‐color‐legacy
HSV HueHSV‐HUE37Gimp.​LayerMode.​HSV_​HUEhsv‐huelayer‐mode:hsv‐hue
HSV Hue LegacyHSV‐HUE‐LEGACY11Gimp.​LayerMode.​HSV_​HUE_​LEGACYhsv‐hue‐legacylayer‐mode:hsv‐hue‐legacy
HSV SaturationHSV‐SATURATION38Gimp.​LayerMode.​HSV_​SATURATIONhsv‐saturationlayer‐mode:hsv‐saturation
HSV Saturation LegacyHSV‐SATURATION‐LEGACY12Gimp.​LayerMode.​HSV_​SATURATION_​LEGACYhsv‐saturation‐legacylayer‐mode:hsv‐saturation‐legacy
HSV ValueHSV‐VALUE40Gimp.​LayerMode.​HSV_​VALUEhsv‐valuelayer‐mode:hsv‐value
HSV Value LegacyHSV‐VALUE‐LEGACY14Gimp.​LayerMode.​HSV_​VALUE_​LEGACYhsv‐value‐legacylayer‐mode:hsv‐value‐legacy
LCH ChromaLCH‐CHROMA25Gimp.​LayerMode.​LCH_​CHROMAlch‐chromalayer‐mode:lch‐chroma
LCH ColorLCH‐COLOR26Gimp.​LayerMode.​LCH_​COLORlch‐colorlayer‐mode:lch‐color
LCH HueLCH‐HUE24Gimp.​LayerMode.​LCH_​HUElch‐huelayer‐mode:lch‐hue
LCH LightnessLCH‐LIGHTNESS27Gimp.​LayerMode.​LCH_​LIGHTNESSlch‐lightnesslayer‐mode:lch‐lightness
Lighten OnlyLIGHTEN‐ONLY36Gimp.​LayerMode.​LIGHTEN_​ONLYlighten‐onlylayer‐mode:lighten‐only
Lighten Only LegacyLIGHTEN‐ONLY‐LEGACY10Gimp.​LayerMode.​LIGHTEN_​ONLY_​LEGACYlighten‐only‐legacylayer‐mode:lighten‐only‐legacy
Linear BurnLINEAR‐BURN53Gimp.​LayerMode.​LINEAR_​BURNlinear‐burnlayer‐mode:linear‐burn
Linear LightLINEAR‐LIGHT50Gimp.​LayerMode.​LINEAR_​LIGHTlinear‐lightlayer‐mode:linear‐light
Luma Darken OnlyLUMA‐DARKEN‐ONLY54Gimp.​LayerMode.​LUMA_​DARKEN_​ONLYluma‐darken‐onlylayer‐mode:luma‐darken‐only
Luma Lighten OnlyLUMA‐LIGHTEN‐ONLY55Gimp.​LayerMode.​LUMA_​LIGHTEN_​ONLYluma‐lighten‐onlylayer‐mode:luma‐lighten‐only
LuminanceLUMINANCE56Gimp.​LayerMode.​LUMINANCEluminancelayer‐mode:luminance
MergeMERGE59Gimp.​LayerMode.​MERGEmergelayer‐mode:merge
MultiplyMULTIPLY30Gimp.​LayerMode.​MULTIPLYmultiplylayer‐mode:multiply
Multiply LegacyMULTIPLY‐LEGACY3Gimp.​LayerMode.​MULTIPLY_​LEGACYmultiply‐legacylayer‐mode:multiply‐legacy
NormalNORMAL28Gimp.​LayerMode.​NORMALnormallayer‐mode:normal
Normal LegacyNORMAL‐LEGACY0Gimp.​LayerMode.​NORMAL_​LEGACYnormal‐legacylayer‐mode:normal‐legacy
OverlayOVERLAY23Gimp.​LayerMode.​OVERLAYoverlaylayer‐mode:overlay
Overlay LegacyOVERLAY‐LEGACY5Gimp.​LayerMode.​OVERLAY_​LEGACYoverlay‐legacylayer‐mode:overlay‐legacy
Pass ThroughPASS‐THROUGH61Gimp.​LayerMode.​PASS_​THROUGHpass‐throughlayer‐mode:pass‐through
Pin LightPIN‐LIGHT49Gimp.​LayerMode.​PIN_​LIGHTpin‐lightlayer‐mode:pin‐light
ReplaceREPLACE62Gimp.​LayerMode.​REPLACEreplacelayer‐mode:replace
ScreenSCREEN31Gimp.​LayerMode.​SCREENscreenlayer‐mode:screen
Screen LegacySCREEN‐LEGACY4Gimp.​LayerMode.​SCREEN_​LEGACYscreen‐legacylayer‐mode:screen‐legacy
Soft LightSOFTLIGHT45Gimp.​LayerMode.​SOFTLIGHTsoftlightlayer‐mode:softlight
Soft Light LegacySOFTLIGHT‐LEGACY19Gimp.​LayerMode.​SOFTLIGHT_​LEGACYsoftlight‐legacylayer‐mode:softlight‐legacy
SplitSPLIT60Gimp.​LayerMode.​SPLITsplitlayer‐mode:split
SubtractSUBTRACT34Gimp.​LayerMode.​SUBTRACTsubtractlayer‐mode:subtract
Subtract LegacySUBTRACT‐LEGACY8Gimp.​LayerMode.​SUBTRACT_​LEGACYsubtract‐legacylayer‐mode:subtract‐legacy
Vivid LightVIVID‐LIGHT48Gimp.​LayerMode.​VIVID_​LIGHTvivid‐lightlayer‐mode:vivid‐light

Gimp.​MaskApplyMode

Whether applying a layer mask merges it into the layer’s alpha channel (APPLY) or simply removes it without applying any changes (DISCARD).

UI nameCode nameInteger valuePython enumGEGL nickname
ApplyAPPLY0Gimp.​MaskApplyMode.​APPLYapply
DiscardDISCARD1Gimp.​MaskApplyMode.​DISCARDdiscard

Gimp.​MergeType

Controls the canvas size of the result when merging layers: expand to fit all layers, clip to the image bounds, clip to the bottom layer, or flatten with background fill.

UI nameCode nameInteger valuePython enumGEGL nickname
Clip To Bottom LayerCLIP‐TO‐BOTTOM‐LAYER2Gimp.​MergeType.​CLIP_​TO_​BOTTOM_​LAYERclip‐to‐bottom‐layer
Clip To ImageCLIP‐TO‐IMAGE1Gimp.​MergeType.​CLIP_​TO_​IMAGEclip‐to‐image
Expand As NecessaryEXPAND‐AS‐NECESSARY0Gimp.​MergeType.​EXPAND_​AS_​NECESSARYexpand‐as‐necessary
Flatten ImageFLATTEN‐IMAGE3Gimp.​MergeType.​FLATTEN_​IMAGEflatten‐image

Gimp.​MessageHandlerType

Where GIMP directs its messages: a GUI dialog (MESSAGE_BOX), the console/terminal (CONSOLE), or the Script-Fu/error console (ERROR_CONSOLE).

UI nameCode nameInteger valuePython enumGEGL nickname
ConsoleCONSOLE1Gimp.​MessageHandlerType.​CONSOLEconsole
Error ConsoleERROR‐CONSOLE2Gimp.​MessageHandlerType.​ERROR_​CONSOLEerror‐console
Message BoxMESSAGE‐BOX0Gimp.​MessageHandlerType.​MESSAGE_​BOXmessage‐box

Gimp.​MetadataColorspace

The colour space declared in an image file’s metadata (e.g. EXIF). Used when reading files to determine how to handle the embedded colour profile.

UI nameCode nameInteger valuePython enumGEGL nickname
AdobeRGBADOBERGB3Gimp.​MetadataColorspace.​ADOBERGBadobergb
sRGBSRGB2Gimp.​MetadataColorspace.​SRGBsrgb
UncalibratedUNCALIBRATED1Gimp.​MetadataColorspace.​UNCALIBRATEDuncalibrated
UnspecifiedUNSPECIFIED0Gimp.​MetadataColorspace.​UNSPECIFIEDunspecified

Gimp.​ModuleError

Error codes returned by GIMP’s module system (plug-in/extension loader). Rarely needed directly in Python plug-ins.

UI nameCode nameInteger valuePython enumGEGL nickname
Module FailedMODULE_​FAILED0Gimp.​ModuleError.​MODULE_​FAILEDmodule_​failed

Gimp.​ModuleState

The load state of a GIMP module: successfully loaded, failed to load, not yet loaded, or in an error state.

UI nameCode nameInteger valuePython enumGEGL nickname
ErrorERROR0Gimp.​ModuleState.​ERRORerror
Load FailedLOAD_​FAILED2Gimp.​ModuleState.​LOAD_​FAILEDload_​failed
LoadedLOADED1Gimp.​ModuleState.​LOADEDloaded
Not LoadedNOT_​LOADED3Gimp.​ModuleState.​NOT_​LOADEDnot_​loaded

Gimp.​OffsetType

What fills the revealed area when offsetting (shifting) a layer: the layer’s own edge colour, transparency, or wrapping the opposite edge around.

UI nameCode nameInteger valuePython enumGEGL nickname
ColorCOLOR0Gimp.​OffsetType.​COLORcolor
TransparentTRANSPARENT1Gimp.​OffsetType.​TRANSPARENTtransparent
Wrap AroundWRAP‐AROUND2Gimp.​OffsetType.​WRAP_​AROUNDwrap‐around

Gimp.​OrientationType

A simple horizontal/vertical/unknown orientation flag, used in guides, transforms, and flip operations.

UI nameCode nameInteger valuePython enumGEGL nickname
HorizontalHORIZONTAL0Gimp.​OrientationType.​HORIZONTALhorizontal
UnknownUNKNOWN2Gimp.​OrientationType.​UNKNOWNunknown
VerticalVERTICAL1Gimp.​OrientationType.​VERTICALvertical

Gimp.​PDBErrorHandler

Controls which code handles errors from PDB procedure calls: GIMP’s internal handler, or the calling plug-in itself. Set to PLUGIN if you want to catch and handle PDB errors in your own code.

UI nameCode nameInteger valuePython enumGEGL nickname
InternalINTERNAL0Gimp.​PDBErrorHandler.​INTERNALinternal
PluginPLUGIN1Gimp.​PDBErrorHandler.​PLUGINplugin

Gimp.​PDBProcType

The type of a registered PDB procedure: built-in (INTERNAL), a standard plug-in (PLUGIN), a persistent/server-style plug-in (PERSISTENT), or a temporary procedure registered at runtime (TEMPORARY).

UI nameCode nameInteger valuePython enumGEGL nickname
InternalINTERNAL0Gimp.​PDBProcType.​INTERNALinternal
PersistentPERSISTENT2Gimp.​PDBProcType.​PERSISTENTpersistent
PluginPLUGIN1Gimp.​PDBProcType.​PLUGINplugin
TemporaryTEMPORARY3Gimp.​PDBProcType.​TEMPORARYtemporary

Gimp.​PDBStatusType

The return status of a PDB procedure call. Always check for SUCCESS or CANCEL; CALLING_ERROR indicates wrong arguments, EXECUTION_ERROR indicates a runtime failure.

UI nameCode nameInteger valuePython enumGEGL nickname
Calling ErrorCALLING‐ERROR1Gimp.​PDBStatusType.​CALLING_​ERRORcalling‐error
CancelCANCEL4Gimp.​PDBStatusType.​CANCELcancel
Execution ErrorEXECUTION‐ERROR0Gimp.​PDBStatusType.​EXECUTION_​ERRORexecution‐error
Pass ThroughPASS‐THROUGH2Gimp.​PDBStatusType.​PASS_​THROUGHpass‐through
SuccessSUCCESS3Gimp.​PDBStatusType.​SUCCESSsuccess

Gimp.​PaintApplicationMode

How paint is applied during a stroke: CONSTANT applies paint uniformly along the stroke; INCREMENTAL builds up opacity with each dab, including where the stroke overlaps itself.

UI nameCode nameInteger valuePython enumGEGL nickname
ConstantCONSTANT0Gimp.​PaintApplicationMode.​CONSTANTconstant
IncrementalINCREMENTAL1Gimp.​PaintApplicationMode.​INCREMENTALincremental

Gimp.​PathStrokeType

The type of curve used in a path stroke. Currently only Bézier curves are supported.

UI nameCode nameInteger valuePython enumGEGL nickname
BezierBEZIER0Gimp.​PathStrokeType.​BEZIERbezier

Gimp.​PixbufTransparency

How transparency is represented when a drawable is exported as a GdkPixbuf: preserve the alpha channel, or render it against a small or large checkerboard pattern.

UI nameCode nameInteger valuePython enumGEGL nickname
Keep AlphaKEEP_​ALPHA0Gimp.​PixbufTransparency.​KEEP_​ALPHAkeep_​alpha
Large ChecksLARGE_​CHECKS2Gimp.​PixbufTransparency.​LARGE_​CHECKSlarge_​checks
Small ChecksSMALL_​CHECKS1Gimp.​PixbufTransparency.​SMALL_​CHECKSsmall_​checks

Gimp.​Precision

The full pixel encoding format of an image, combining bit depth (U8 through Double) with the tonal response curve (linear, non-linear, or perceptual). For example, U8_NON_LINEAR is the traditional 8-bit gamma-encoded format.

UI nameCode nameInteger valuePython enumGEGL nickname
Double LinearDOUBLE‐LINEAR700Gimp.​Precision.​DOUBLE_​LINEARdouble‐linear
Double Non LinearDOUBLE‐NON‐LINEAR750Gimp.​Precision.​DOUBLE_​NON_​LINEARdouble‐non‐linear
Double PerceptualDOUBLE‐PERCEPTUAL775Gimp.​Precision.​DOUBLE_​PERCEPTUALdouble‐perceptual
Float LinearFLOAT‐LINEAR600Gimp.​Precision.​FLOAT_​LINEARfloat‐linear
Float Non LinearFLOAT‐NON‐LINEAR650Gimp.​Precision.​FLOAT_​NON_​LINEARfloat‐non‐linear
Float PerceptualFLOAT‐PERCEPTUAL675Gimp.​Precision.​FLOAT_​PERCEPTUALfloat‐perceptual
Half LinearHALF‐LINEAR500Gimp.​Precision.​HALF_​LINEARhalf‐linear
Half Non LinearHALF‐NON‐LINEAR550Gimp.​Precision.​HALF_​NON_​LINEARhalf‐non‐linear
Half PerceptualHALF‐PERCEPTUAL575Gimp.​Precision.​HALF_​PERCEPTUALhalf‐perceptual
U16 LinearU16‐LINEAR200Gimp.​Precision.​U16_​LINEARu16‐linear
U16 Non LinearU16‐NON‐LINEAR250Gimp.​Precision.​U16_​NON_​LINEARu16‐non‐linear
U16 PerceptualU16‐PERCEPTUAL275Gimp.​Precision.​U16_​PERCEPTUALu16‐perceptual
U32 LinearU32‐LINEAR300Gimp.​Precision.​U32_​LINEARu32‐linear
U32 Non LinearU32‐NON‐LINEAR350Gimp.​Precision.​U32_​NON_​LINEARu32‐non‐linear
U32 PerceptualU32‐PERCEPTUAL375Gimp.​Precision.​U32_​PERCEPTUALu32‐perceptual
U8 LinearU8‐LINEAR100Gimp.​Precision.​U8_​LINEARu8‐linear
U8 Non LinearU8‐NON‐LINEAR150Gimp.​Precision.​U8_​NON_​LINEARu8‐non‐linear
U8 PerceptualU8‐PERCEPTUAL175Gimp.​Precision.​U8_​PERCEPTUALu8‐perceptual

Gimp.​ProgressCommand

Commands for controlling GIMP’s progress bar from within a plug-in: start, update value or text, pulse (indeterminate), end, or retrieve the parent window handle.

UI nameCode nameInteger valuePython enumGEGL nickname
EndEND1Gimp.​ProgressCommand.​ENDend
Get WindowGET‐WINDOW5Gimp.​ProgressCommand.​GET_​WINDOWget‐window
PulsePULSE4Gimp.​ProgressCommand.​PULSEpulse
Set TextSET‐TEXT2Gimp.​ProgressCommand.​SET_​TEXTset‐text
Set ValueSET‐VALUE3Gimp.​ProgressCommand.​SET_​VALUEset‐value
StartSTART0Gimp.​ProgressCommand.​STARTstart

Gimp.​RepeatMode

How a gradient behaves beyond its defined endpoints: no repeat (truncate to end colour), sawtooth repeat, or triangular (ping-pong) repeat.

UI nameCode nameInteger valuePython enumGEGL nickname
NoneNONE0Gimp.​RepeatMode.​NONEnone
SawtoothSAWTOOTH2Gimp.​RepeatMode.​SAWTOOTHsawtooth
TriangularTRIANGULAR3Gimp.​RepeatMode.​TRIANGULARtriangular
TruncateTRUNCATE1Gimp.​RepeatMode.​TRUNCATEtruncate

Gimp.​RotationType

Simple 90-degree-increment rotation directions: 90°, 180°, or 270° clockwise.

UI nameCode nameInteger valuePython enumGEGL nickname
180 DegreesDEGREES1801Gimp.​RotationType.​DEGREES180degrees180
270 DegreesDEGREES2702Gimp.​RotationType.​DEGREES270degrees270
90 DegreesDEGREES900Gimp.​RotationType.​DEGREES90degrees90

Gimp.​RunMode

How a plug-in is being invoked: INTERACTIVE (show a dialog), NONINTERACTIVE (use supplied arguments, no UI), or WITH_LAST_VALS (reuse the last-used settings without showing a dialog).

UI nameCode nameInteger valuePython enumGEGL nickname
InteractiveINTERACTIVE0Gimp.​RunMode.​INTERACTIVEinteractive
Non InteractiveNONINTERACTIVE1Gimp.​RunMode.​NONINTERACTIVEnoninteractive
With Last ValuesWITH‐LAST‐VALS2Gimp.​RunMode.​WITH_​LAST_​VALSwith‐last‐vals

Gimp.​SelectCriterion

The colour attribute used to determine similarity when making fuzzy or by-colour selections: composite colour, individual RGB or HSV channels, LCH components, or alpha only.

UI nameCode nameInteger valuePython enumGEGL nickname
AlphaALPHA10Gimp.​SelectCriterion.​ALPHAalpha
CompositeCOMPOSITE0Gimp.​SelectCriterion.​COMPOSITEcomposite
HSV HueHSV‐HUE4Gimp.​SelectCriterion.​HSV_​HUEhsv‐hue
HSV SaturationHSV‐SATURATION5Gimp.​SelectCriterion.​HSV_​SATURATIONhsv‐saturation
HSV ValueHSV‐VALUE6Gimp.​SelectCriterion.​HSV_​VALUEhsv‐value
LCH ChromaLCH‐CHROMA8Gimp.​SelectCriterion.​LCH_​CHROMAlch‐chroma
LCH HueLCH‐HUE9Gimp.​SelectCriterion.​LCH_​HUElch‐hue
LCH LightnessLCH‐LIGHTNESS7Gimp.​SelectCriterion.​LCH_​LIGHTNESSlch‐lightness
RGB BlueRGB‐BLUE3Gimp.​SelectCriterion.​RGB_​BLUErgb‐blue
RGB GreenRGB‐GREEN2Gimp.​SelectCriterion.​RGB_​GREENrgb‐green
RGB RedRGB‐RED1Gimp.​SelectCriterion.​RGB_​REDrgb‐red

Gimp.​SizeType

Unit used for text size in the legacy text API: pixels or points. Prefer the modern text API where possible.

UI nameCode nameInteger valuePython enumGEGL nickname
PixelsPIXELS0Gimp.​SizeType.​PIXELSpixels
PointsPOINTS1Gimp.​SizeType.​POINTSpoints

Gimp.​StackTraceMode

Controls when GIMP generates a stack trace on error: never, always, or by prompting the user. Useful for debugging plug-ins during development.

UI nameCode nameInteger valuePython enumGEGL nickname
AlwaysALWAYS2Gimp.​StackTraceMode.​ALWAYSalways
NeverNEVER0Gimp.​StackTraceMode.​NEVERnever
QueryQUERY1Gimp.​StackTraceMode.​QUERYquery

Gimp.​StrokeMethod

How a selection or path is stroked: as a simple painted line (LINE) or using a specific paint tool/brush (PAINT_METHOD).

UI nameCode nameInteger valuePython enumGEGL nickname
LineLINE0Gimp.​StrokeMethod.​LINEline
Paint MethodPAINT‐METHOD1Gimp.​StrokeMethod.​PAINT_​METHODpaint‐method

Gimp.​TextDirection

The writing direction for a text layer: left-to-right, right-to-left, or top-to-bottom (with variants for upright glyphs). Important for Arabic, Hebrew, CJK, and other scripts.

UI nameCode nameInteger valuePython enumGEGL nickname
LTRLTR0Gimp.​TextDirection.​LTRltr
RTLRTL1Gimp.​TextDirection.​RTLrtl
TTB LTRTTB‐LTR4Gimp.​TextDirection.​TTB_​LTRttb‐ltr
TTB LTR UprightTTB‐LTR‐UPRIGHT5Gimp.​TextDirection.​TTB_​LTR_​UPRIGHTttb‐ltr‐upright
TTB RTLTTB‐RTL2Gimp.​TextDirection.​TTB_​RTLttb‐rtl
TTB RTL UprightTTB‐RTL‐UPRIGHT3Gimp.​TextDirection.​TTB_​RTL_​UPRIGHTttb‐rtl‐upright

Gimp.​TextHintStyle

The strength of hinting applied when rendering text. Hinting adjusts glyph outlines to align with the pixel grid. Stronger hinting improves legibility at small sizes but reduces fidelity to the original letterforms.

UI nameCode nameInteger valuePython enumGEGL nickname
FullFULL3Gimp.​TextHintStyle.​FULLfull
MediumMEDIUM2Gimp.​TextHintStyle.​MEDIUMmedium
NoneNONE0Gimp.​TextHintStyle.​NONEnone
SlightSLIGHT1Gimp.​TextHintStyle.​SLIGHTslight

Gimp.​TextJustification

The horizontal alignment of text within a text layer: left, right, centre, or fully justified.

UI nameCode nameInteger valuePython enumGEGL nickname
CenterCENTER2Gimp.​TextJustification.​CENTERcenter
FillFILL3Gimp.​TextJustification.​FILLfill
LeftLEFT0Gimp.​TextJustification.​LEFTleft
RightRIGHT1Gimp.​TextJustification.​RIGHTright

Gimp.​TransferMode

Which tonal range is affected by a curves or levels adjustment: shadows, midtones, or highlights.

UI nameCode nameInteger valuePython enumGEGL nickname
HighlightsHIGHLIGHTS2Gimp.​TransferMode.​HIGHLIGHTShighlights
MidtonesMIDTONES1Gimp.​TransferMode.​MIDTONESmidtones
ShadowsSHADOWS0Gimp.​TransferMode.​SHADOWSshadows

Gimp.​TransformDirection

The direction of a geometric transform: FORWARD applies the transform as specified; BACKWARD applies the inverse transform.

UI nameCode nameInteger valuePython enumGEGL nickname
BackwardBACKWARD1Gimp.​TransformDirection.​BACKWARDbackward
ForwardFORWARD0Gimp.​TransformDirection.​FORWARDforward

Gimp.​TransformResize

How the layer or image canvas is resized after a transform operation: adjust to fit the result, clip to the original bounds, or crop (with or without maintaining aspect ratio).

UI nameCode nameInteger valuePython enumGEGL nickname
AdjustADJUST0Gimp.​TransformResize.​ADJUSTadjust
ClipCLIP1Gimp.​TransformResize.​CLIPclip
CropCROP2Gimp.​TransformResize.​CROPcrop
Crop With AspectCROP‐WITH‐ASPECT3Gimp.​TransformResize.​CROP_​WITH_​ASPECTcrop‐with‐aspect

Gimp.​TRCType

The tonal response curve type of a colour space: linear light, non-linear (gamma-encoded), or perceptual. Relevant when working with precision and colour space conversions.

UI nameCode nameInteger valuePython enumGEGL nickname
LinearLINEAR0Gimp.​TRCType.​LINEARlinear
Non LinearNON‐LINEAR1Gimp.​TRCType.​NON_​LINEARnon‐linear
PerceptualPERCEPTUAL2Gimp.​TRCType.​PERCEPTUALperceptual

Gimp.​UnitID

Built-in unit identifiers for image dimensions and resolution: pixels, inches, millimetres, points, picas, or percentage. User-created custom units have IDs above these built-in values.

UI nameCode nameInteger valuePython enumGEGL nickname
EndEND5Gimp.​UnitID.​ENDend
InchINCH1Gimp.​UnitID.​INCHinch
MMMM2Gimp.​UnitID.​MMmm
PercentPERCENT65536Gimp.​UnitID.​PERCENTpercent
PicaPICA4Gimp.​UnitID.​PICApica
PixelPIXEL0Gimp.​UnitID.​PIXELpixel
PointPOINT3Gimp.​UnitID.​POINTpoint

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *