commander>Retinex-Filter macro> comment>Add a new Retinex layer and apply the retinex filter with default settings >>>RetinexLayer = pdb.gimp_layer_new_from_visible(theImage, theImage, "Retinex") >>>theImage.add_layer(RetinexLayer,0) comment>Retinex parameters - Scale = 240; ScaleDiv = 3; Level = 0; Dynamic = 1.2 >>>pdb.plug_in_retinex(theImage, RetinexLayer, 240, 3, 0, 1.2) comment>Make the retinex layer B&W - retinex distorts color >>>pdb.gimp_desaturate_full(RetinexLayer, 1) >>>RetinexLayer.mode = OVERLAY_MODE >>>RetinexLayer.opacity = 75.0 comment>Adjust the opacity based on Property EnhanceContrastLevel >>>ContrastLevel = str(theImage.parasite_find('EnhanceContrastLevel')) >>>if (ContrastLevel == 'EXTRA'): RetinexLayer.opacity = 100.0 >>>if (ContrastLevel == 'NORMAL'): RetinexLayer.opacity = 75.0 >>>if (ContrastLevel == 'MID'): RetinexLayer.opacity = 50.0 >>>if (ContrastLevel == 'NONE'): RetinexLayer.opacity = 0.0