diff --git a/README.md b/README.md index db5daeb8..9251bcad 100644 --- a/README.md +++ b/README.md @@ -6,16 +6,16 @@ DrawBot is a powerful, free application for macOS that invites you to write Python scripts to generate two-dimensional graphics. The built-in graphics primitives support rectangles, ovals, (bezier) paths, polygons, text objects, colors, transparency and much more. You can program multi-page documents and stop-motion animations. Export formats include PDF, SVG, PNG, JPEG, TIFF, animated GIF and MP4 video. -To download the latest version of the app, go to +To download the latest version of the app, go to http://www.drawbot.com/content/download.html --- ## Using DrawBot as a Python module -DrawBot can also be installed as a Python module, the app is not required. It works on Python3.10+. +DrawBot can also be installed as a Python module, the app is not required. It works on Python3.11+. -#### Install +#### Install The easiest way is to use pip: diff --git a/docs/conf.py b/docs/conf.py index 733ab338..e62b6546 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -475,4 +475,5 @@ def format_args(self): def setup(app): app.add_directive('showcode', ShowCode) app.add_directive('downloadcode', DownloadCode) - app.add_autodocumenter(DrawBotDocumenter) + # 'self' seems to be removed upstream while formatting the arguments + # app.add_autodocumenter(DrawBotDocumenter) diff --git a/docs/content/shapes/bezierPath.rst b/docs/content/shapes/bezierPath.rst index e502f02e..cfef4be8 100644 --- a/docs/content/shapes/bezierPath.rst +++ b/docs/content/shapes/bezierPath.rst @@ -6,4 +6,4 @@ Bezier Paths :undoc-members: :inherited-members: :show-inheritance: - :exclude-members: copyContextProperties \ No newline at end of file + :exclude-members: copyContextProperties, add_note, args, with_traceback, log, MissingComponentError, svgClass, svgID, svgLink \ No newline at end of file diff --git a/docs/content/text/formattedString.rst b/docs/content/text/formattedString.rst index 47ee3f54..4c21ee81 100644 --- a/docs/content/text/formattedString.rst +++ b/docs/content/text/formattedString.rst @@ -6,4 +6,4 @@ Formatted Strings :undoc-members: :inherited-members: :show-inheritance: - :exclude-members: copyContextProperties \ No newline at end of file + :exclude-members: copyContextProperties, svgClass, svgID, svgLink \ No newline at end of file diff --git a/drawBot/context/tools/imageObject.py b/drawBot/context/tools/imageObject.py index 09d0d59a..30d6e1ed 100644 --- a/drawBot/context/tools/imageObject.py +++ b/drawBot/context/tools/imageObject.py @@ -235,8 +235,12 @@ def _applyFilters(self): w, h = filterDict.get("size", extent.size) dummy = AppKit.NSImage.alloc().initWithSize_((w, h)) - scaleX = w / extent.size.width - scaleY = h / extent.size.height + scaleX = 1 + if extent.size.width != 0: + scaleX = w / extent.size.width + scaleY = 1 + if extent.size.height != 0: + scaleY = h / extent.size.height dummy.lockFocus() ctx = AppKit.NSGraphicsContext.currentContext() ctx.setShouldAntialias_(False) @@ -277,22 +281,22 @@ def accordionFoldTransition(self, targetImage: Self, bottomHeight: float = 0.0, **Arguments:** - `targetImage` an Image object. The target image for a transition. - `bottomHeight` a float. The height in pixels from the bottom of the image to the bottom of the folded part of the transition. - `numberOfFolds` a float. The number of folds used in the transition. - `foldShadowAmount` a float. A value that specifies the intensity of the shadow in the transition. - `time` a float. The duration of the effect. + * `targetImage` an Image object. The target image for a transition. + * `bottomHeight` a float. The height in pixels from the bottom of the image to the bottom of the folded part of the transition. + * `numberOfFolds` a float. The number of folds used in the transition. + * `foldShadowAmount` a float. A value that specifies the intensity of the shadow in the transition. + * `time` a float. The duration of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAccordionFoldTransition', attributes=dict( - targetImage=targetImage, - bottomHeight=bottomHeight, - numberOfFolds=numberOfFolds, - foldShadowAmount=foldShadowAmount, - time=time + inputTargetImage=targetImage._ciImage(), + inputBottomHeight=bottomHeight, + inputNumberOfFolds=numberOfFolds, + inputFoldShadowAmount=foldShadowAmount, + inputTime=time ) ) self._addFilter(filterDict) @@ -303,14 +307,14 @@ def additionCompositing(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAdditionCompositing', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -321,14 +325,14 @@ def affineClamp(self, transform: TransformTuple = (0.4, 0.0, 0.0, 0.4, 0.0, 0.0) **Arguments:** - `transform` a tuple (xx, xy, yx, yy, x, y). The transform to apply to the image. + * `transform` a tuple (xx, xy, yx, yy, x, y). The transform to apply to the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAffineClamp', attributes=dict( - transform=transform + inputTransform=transform ) ) self._addFilter(filterDict) @@ -339,14 +343,14 @@ def affineTile(self, transform: TransformTuple = (0.4, 0.0, 0.0, 0.4, 0.0, 0.0)) **Arguments:** - `transform` a tuple (xx, xy, yx, yy, x, y). The transform to apply to the image. + * `transform` a tuple (xx, xy, yx, yy, x, y). The transform to apply to the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAffineTile', attributes=dict( - transform=transform + inputTransform=transform ) ) self._addFilter(filterDict) @@ -357,14 +361,14 @@ def areaAverage(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. + * `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAreaAverage', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) @@ -375,18 +379,18 @@ def areaHistogram(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0), scale: fl **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that, after intersection with the image extent, specifies the subregion of the image that you want to process. - `scale` a float. The scale value to use for the histogram values. If the scale is 1.0, then the bins in the resulting image will add up to 1.0. - `count` a float. The number of bins for the histogram. This value will determine the width of the output image. + * `extent` a tuple (x, y, w, h). A rectangle that, after intersection with the image extent, specifies the subregion of the image that you want to process. + * `scale` a float. The scale value to use for the histogram values. If the scale is 1.0, then the bins in the resulting image will add up to 1.0. + * `count` a float. The number of bins for the histogram. This value will determine the width of the output image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAreaHistogram', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - scale=scale, - count=count + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputScale=scale, + inputCount=count ) ) self._addFilter(filterDict) @@ -397,22 +401,22 @@ def areaLogarithmicHistogram(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0) **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. - `scale` a float. The amount of the effect. - `count` a float. The number of bins for the histogram. This value will determine the width of the output image. - `minimumStop` a float. The minimum of the range of color channel values to be in the logarithmic histogram image. - `maximumStop` a float. The maximum of the range of color channel values to be in the logarithmic histogram image. + * `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. + * `scale` a float. The amount of the effect. + * `count` a float. The number of bins for the histogram. This value will determine the width of the output image. + * `minimumStop` a float. The minimum of the range of color channel values to be in the logarithmic histogram image. + * `maximumStop` a float. The maximum of the range of color channel values to be in the logarithmic histogram image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAreaLogarithmicHistogram', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - scale=scale, - count=count, - minimumStop=minimumStop, - maximumStop=maximumStop + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputScale=scale, + inputCount=count, + inputMinimumStop=minimumStop, + inputMaximumStop=maximumStop ) ) self._addFilter(filterDict) @@ -423,14 +427,14 @@ def areaMaximum(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. + * `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAreaMaximum', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) @@ -441,14 +445,14 @@ def areaMaximumAlpha(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. + * `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAreaMaximumAlpha', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) @@ -459,14 +463,14 @@ def areaMinimum(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. + * `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAreaMinimum', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) @@ -477,14 +481,14 @@ def areaMinimumAlpha(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. + * `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAreaMinimumAlpha', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) @@ -495,14 +499,14 @@ def areaMinMax(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. + * `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAreaMinMax', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) @@ -513,69 +517,44 @@ def areaMinMaxRed(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. + * `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAreaMinMaxRed', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) - def attributedTextImageGenerator(self, size: Size, text: FormattedString, scaleFactor: float = 1.0, padding: float = 0.0): - """ - Generate an image attributed string. - - **Arguments:** - - `size` a tuple (w, h) - `text` a `FormattedString`. The attributed text to render. - `scaleFactor` a float. The scale of the font to use for the generated text. - `padding` a float. A value for an additional number of pixels to pad around the text’s bounding box. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIAttributedTextImageGenerator', - attributes=dict( - text=text.getNSObject(), - scaleFactor=scaleFactor, - padding=padding - ), - size=size, - isGenerator=True - ), - self._addFilter(filterDict) - def aztecCodeGenerator(self, size: Size, message: str, layers, compactStyle, correctionLevel: float = 23.0): """ Generate an Aztec barcode image for message data. **Arguments:** - `size` a tuple (w, h) - `message` a string. The message to encode in the Aztec Barcode - `layers` a float. Aztec layers value between 1 and 32. Set to `None` for automatic. - `compactStyle` a bool. Force a compact style Aztec code to `True` or `False`. Set to `None` for automatic. - `correctionLevel` a float. Aztec error correction value between 5 and 95 + * `size` a tuple (w, h) + * `message` a string. The message to encode in the Aztec Barcode + * `layers` a float. Aztec layers value between 1 and 32. Set to `None` for automatic. + * `compactStyle` a bool. Force a compact style Aztec code to `True` or `False`. Set to `None` for automatic. + * `correctionLevel` a float. Aztec error correction value between 5 and 95 """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIAztecCodeGenerator', attributes=dict( - message=AppKit.NSData.dataWithBytes_length_(message, len(message)), - layers=layers, - compactStyle=compactStyle, - correctionLevel=correctionLevel + inputMessage=AppKit.NSData.dataWithBytes_length_(message, len(message)), + inputLayers=layers, + inputCompactStyle=compactStyle, + inputCorrectionLevel=correctionLevel ), size=size, isGenerator=True, fitImage=True - ), + ) self._addFilter(filterDict) def barsSwipeTransition(self, targetImage: Self, angle: float = 3.141592653589793, width: float = 30.0, barOffset: float = 10.0, time: float = 0.0): @@ -584,22 +563,22 @@ def barsSwipeTransition(self, targetImage: Self, angle: float = 3.14159265358979 **Arguments:** - `targetImage` an Image object. The target image for a transition. - `angle` a float in degrees. The angle in degrees of the bars. - `width` a float. The width of each bar. - `barOffset` a float. The offset of one bar with respect to another. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `targetImage` an Image object. The target image for a transition. + * `angle` a float in degrees. The angle in degrees of the bars. + * `width` a float. The width of each bar. + * `barOffset` a float. The offset of one bar with respect to another. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBarsSwipeTransition', attributes=dict( - targetImage=targetImage, - angle=radians(angle), - width=width, - barOffset=barOffset, - time=time + inputTargetImage=targetImage._ciImage(), + inputAngle=radians(angle), + inputWidth=width, + inputBarOffset=barOffset, + inputTime=time ) ) self._addFilter(filterDict) @@ -610,16 +589,16 @@ def blendWithAlphaMask(self, backgroundImage: Self, maskImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. - `maskImage` an Image object. A masking image. + * `backgroundImage` an Image object. The image to use as a background image. + * `maskImage` an Image object. A masking image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBlendWithAlphaMask', attributes=dict( - backgroundImage=backgroundImage, - maskImage=maskImage + inputBackgroundImage=backgroundImage._ciImage(), + inputMaskImage=maskImage._ciImage() ) ) self._addFilter(filterDict) @@ -630,16 +609,16 @@ def blendWithBlueMask(self, backgroundImage: Self, maskImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. - `maskImage` an Image object. A masking image. + * `backgroundImage` an Image object. The image to use as a background image. + * `maskImage` an Image object. A masking image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBlendWithBlueMask', attributes=dict( - backgroundImage=backgroundImage, - maskImage=maskImage + inputBackgroundImage=backgroundImage._ciImage(), + inputMaskImage=maskImage._ciImage() ) ) self._addFilter(filterDict) @@ -650,16 +629,16 @@ def blendWithMask(self, backgroundImage: Self, maskImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. - `maskImage` an Image object. A grayscale mask. When a mask value is 0.0, the result is the background. When the mask value is 1.0, the result is the image. + * `backgroundImage` an Image object. The image to use as a background image. + * `maskImage` an Image object. A grayscale mask. When a mask value is 0.0, the result is the background. When the mask value is 1.0, the result is the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBlendWithMask', attributes=dict( - backgroundImage=backgroundImage, - maskImage=maskImage + inputBackgroundImage=backgroundImage._ciImage(), + inputMaskImage=maskImage._ciImage() ) ) self._addFilter(filterDict) @@ -670,16 +649,16 @@ def blendWithRedMask(self, backgroundImage: Self, maskImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. - `maskImage` an Image object. A masking image. + * `backgroundImage` an Image object. The image to use as a background image. + * `maskImage` an Image object. A masking image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBlendWithRedMask', attributes=dict( - backgroundImage=backgroundImage, - maskImage=maskImage + inputBackgroundImage=backgroundImage._ciImage(), + inputMaskImage=maskImage._ciImage() ) ) self._addFilter(filterDict) @@ -690,16 +669,16 @@ def bloom(self, radius: float = 10.0, intensity: float = 0.5): **Arguments:** - `radius` a float. The radius determines how many pixels are used to create the effect. The larger the radius, the greater the effect. - `intensity` a float. The intensity of the effect. A value of 0.0 is no effect. A value of 1.0 is the maximum effect. + * `radius` a float. The radius determines how many pixels are used to create the effect. The larger the radius, the greater the effect. + * `intensity` a float. The intensity of the effect. A value of 0.0 is no effect. A value of 1.0 is the maximum effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBloom', attributes=dict( - radius=radius, - intensity=intensity + inputRadius=radius, + inputIntensity=intensity ) ) self._addFilter(filterDict) @@ -710,23 +689,23 @@ def blurredRectangleGenerator(self, size: Size, extent: BoundingBox = (0.0, 0.0, **Arguments:** - `size` a tuple (w, h) - `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. - `sigma` a float. The sigma for a gaussian blur. - `color` RGBA tuple Color (r, g, b, a). A color. + * `size` a tuple (w, h) + * `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. + * `sigma` a float. The sigma for a gaussian blur. + * `color` RGBA tuple Color (r, g, b, a). A color. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBlurredRectangleGenerator', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - sigma=sigma, - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputSigma=sigma, + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def bokehBlur(self, radius: float = 20.0, ringAmount: float = 0.0, ringSize: float = 0.1, softness: float = 1.0): @@ -735,20 +714,20 @@ def bokehBlur(self, radius: float = 20.0, ringAmount: float = 0.0, ringSize: flo **Arguments:** - `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. - `ringAmount` a float. The amount of extra emphasis at the ring of the bokeh. - `ringSize` a float. The size of extra emphasis at the ring of the bokeh. - `softness` a float. + * `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. + * `ringAmount` a float. The amount of extra emphasis at the ring of the bokeh. + * `ringSize` a float. The size of extra emphasis at the ring of the bokeh. + * `softness` a float. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBokehBlur', attributes=dict( - radius=radius, - ringAmount=ringAmount, - ringSize=ringSize, - softness=softness + inputRadius=radius, + inputRingAmount=ringAmount, + inputRingSize=ringSize, + inputSoftness=softness ) ) self._addFilter(filterDict) @@ -759,14 +738,14 @@ def boxBlur(self, radius: float = 10.0): **Arguments:** - `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. + * `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBoxBlur', attributes=dict( - radius=radius + inputRadius=radius ) ) self._addFilter(filterDict) @@ -777,18 +756,18 @@ def bumpDistortion(self, center: Point = (150.0, 150.0), radius: float = 300.0, **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. - `scale` a float. The scale of the effect determines the curvature of the bump. A value of 0.0 has no effect. Positive values create an outward bump; negative values create an inward bump. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. + * `scale` a float. The scale of the effect determines the curvature of the bump. A value of 0.0 has no effect. Positive values create an outward bump; negative values create an inward bump. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBumpDistortion', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius=radius, - scale=scale + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius, + inputScale=scale ) ) self._addFilter(filterDict) @@ -799,20 +778,20 @@ def bumpDistortionLinear(self, center: Point = (150.0, 150.0), radius: float = 3 **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. - `angle` a float in degrees. The angle in degrees of the line around which the distortion occurs. - `scale` a float. The scale of the effect. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. + * `angle` a float in degrees. The angle in degrees of the line around which the distortion occurs. + * `scale` a float. The scale of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIBumpDistortionLinear', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius=radius, - angle=radians(angle), - scale=scale + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius, + inputAngle=radians(angle), + inputScale=scale ) ) self._addFilter(filterDict) @@ -823,22 +802,22 @@ def cannyEdgeDetector(self, gaussianSigma: float = 1.6, perceptual: bool = False **Arguments:** - `gaussianSigma` a float. The gaussian sigma of blur to apply to the image to reduce high-frequency noise. - `perceptual` a float. Specifies whether the edge thresholds should be computed in a perceptual color space. - `thresholdHigh` a float. The threshold that determines if gradient magnitude is a strong edge. - `thresholdLow` a float. The threshold that determines if gradient magnitude is a weak edge. - `hysteresisPasses` a float. The number of hysteresis passes to apply to promote weak edge pixels. + * `gaussianSigma` a float. The gaussian sigma of blur to apply to the image to reduce high-frequency noise. + * `perceptual` a float. Specifies whether the edge thresholds should be computed in a perceptual color space. + * `thresholdHigh` a float. The threshold that determines if gradient magnitude is a strong edge. + * `thresholdLow` a float. The threshold that determines if gradient magnitude is a weak edge. + * `hysteresisPasses` a float. The number of hysteresis passes to apply to promote weak edge pixels. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICannyEdgeDetector', attributes=dict( - gaussianSigma=gaussianSigma, - perceptual=perceptual, - thresholdHigh=thresholdHigh, - thresholdLow=thresholdLow, - hysteresisPasses=hysteresisPasses + inputGaussianSigma=gaussianSigma, + inputPerceptual=perceptual, + inputThresholdHigh=thresholdHigh, + inputThresholdLow=thresholdLow, + inputHysteresisPasses=hysteresisPasses ) ) self._addFilter(filterDict) @@ -849,27 +828,27 @@ def checkerboardGenerator(self, size: Size, center: Point = (150.0, 150.0), colo **Arguments:** - `size` a tuple (w, h) - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `color0` RGBA tuple Color (r, g, b, a). A color to use for the first set of squares. - `color1` RGBA tuple Color (r, g, b, a). A color to use for the second set of squares. - `width` a float. The width of the squares in the pattern. - `sharpness` a float. The sharpness of the edges in pattern. The smaller the value, the more blurry the pattern. Values range from 0.0 to 1.0. + * `size` a tuple (w, h) + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `color0` RGBA tuple Color (r, g, b, a). A color to use for the first set of squares. + * `color1` RGBA tuple Color (r, g, b, a). A color to use for the second set of squares. + * `width` a float. The width of the squares in the pattern. + * `sharpness` a float. The sharpness of the edges in pattern. The smaller the value, the more blurry the pattern. Values range from 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICheckerboardGenerator', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - color0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), - color1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]), - width=width, - sharpness=sharpness + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputColor0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), + inputColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]), + inputWidth=width, + inputSharpness=sharpness ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def circleSplashDistortion(self, center: Point = (150.0, 150.0), radius: float = 150.0): @@ -878,16 +857,16 @@ def circleSplashDistortion(self, center: Point = (150.0, 150.0), radius: float = **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICircleSplashDistortion', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius=radius + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius ) ) self._addFilter(filterDict) @@ -898,18 +877,18 @@ def circularScreen(self, center: Point = (150.0, 150.0), width: float = 6.0, sha **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `width` a float. The distance between each circle in the pattern. - `sharpness` a float. The sharpness of the circles. The larger the value, the sharper the circles. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `width` a float. The distance between each circle in the pattern. + * `sharpness` a float. The sharpness of the circles. The larger the value, the sharper the circles. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICircularScreen', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - width=width, - sharpness=sharpness + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputWidth=width, + inputSharpness=sharpness ) ) self._addFilter(filterDict) @@ -920,18 +899,18 @@ def circularWrap(self, center: Point = (150.0, 150.0), radius: float = 150.0, an **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. - `angle` a float in degrees. The angle in degrees of the effect. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. + * `angle` a float in degrees. The angle in degrees of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICircularWrap', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius=radius, - angle=radians(angle) + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius, + inputAngle=radians(angle) ) ) self._addFilter(filterDict) @@ -942,14 +921,14 @@ def clamp(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. + * `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIClamp', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) @@ -960,24 +939,24 @@ def CMYKHalftone(self, center: Point = (150.0, 150.0), width: float = 6.0, angle **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `width` a float. The distance between dots in the pattern. - `angle` a float in degrees. The angle in degrees of the pattern. - `sharpness` a float. The sharpness of the pattern. The larger the value, the sharper the pattern. - `GCR` a float. The gray component replacement value. The value can vary from 0.0 (none) to 1.0. - `UCR` a float. The under color removal value. The value can vary from 0.0 to 1.0. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `width` a float. The distance between dots in the pattern. + * `angle` a float in degrees. The angle in degrees of the pattern. + * `sharpness` a float. The sharpness of the pattern. The larger the value, the sharper the pattern. + * `GCR` a float. The gray component replacement value. The value can vary from 0.0 (none) to 1.0. + * `UCR` a float. The under color removal value. The value can vary from 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICMYKHalftone', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - width=width, - angle=radians(angle), - sharpness=sharpness, - GCR=GCR, - UCR=UCR + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputWidth=width, + inputAngle=radians(angle), + inputSharpness=sharpness, + inputGCR=GCR, + inputUCR=UCR ) ) self._addFilter(filterDict) @@ -988,23 +967,23 @@ def code128BarcodeGenerator(self, size: Size, message: str, quietSpace: float = **Arguments:** - `size` a tuple (w, h) - `message` a string. The message to encode in the Code 128 Barcode - `quietSpace` a float. The number of empty white pixels that should surround the barcode. - `barcodeHeight` a float. The height of the generated barcode in pixels. + * `size` a tuple (w, h) + * `message` a string. The message to encode in the Code 128 Barcode + * `quietSpace` a float. The number of empty white pixels that should surround the barcode. + * `barcodeHeight` a float. The height of the generated barcode in pixels. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICode128BarcodeGenerator', attributes=dict( - message=AppKit.NSData.dataWithBytes_length_(message, len(message)), - quietSpace=quietSpace, - barcodeHeight=barcodeHeight + inputMessage=AppKit.NSData.dataWithBytes_length_(message, len(message)), + inputQuietSpace=quietSpace, + inputBarcodeHeight=barcodeHeight ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def colorAbsoluteDifference(self, image2): @@ -1013,14 +992,14 @@ def colorAbsoluteDifference(self, image2): **Arguments:** - `image2` a float. The second input image for differencing. + * `image2` a float. The second input image for differencing. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorAbsoluteDifference', attributes=dict( - image2=image2 + inputImage2=image2 ) ) self._addFilter(filterDict) @@ -1031,14 +1010,14 @@ def colorBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -1049,14 +1028,14 @@ def colorBurnBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorBurnBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -1067,16 +1046,16 @@ def colorClamp(self, minComponents: BoundingBox = (0.0, 0.0, 0.0, 0.0), maxCompo **Arguments:** - `minComponents` a tuple (x, y, w, h). Lower clamping values. - `maxComponents` a tuple (x, y, w, h). Higher clamping values. + * `minComponents` a tuple (x, y, w, h). Lower clamping values. + * `maxComponents` a tuple (x, y, w, h). Higher clamping values. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorClamp', attributes=dict( - minComponents=AppKit.CIVector.vectorWithValues_count_(minComponents, 4), - maxComponents=AppKit.CIVector.vectorWithValues_count_(maxComponents, 4) + inputMinComponents=AppKit.CIVector.vectorWithValues_count_(minComponents, 4), + inputMaxComponents=AppKit.CIVector.vectorWithValues_count_(maxComponents, 4) ) ) self._addFilter(filterDict) @@ -1087,18 +1066,18 @@ def colorControls(self, saturation: float = 1.0, brightness: float = 0.0, contra **Arguments:** - `saturation` a float. The amount of saturation to apply. The larger the value, the more saturated the result. - `brightness` a float. The amount of brightness to apply. The larger the value, the brighter the result. - `contrast` a float. The amount of contrast to apply. The larger the value, the more contrast in the resulting image. + * `saturation` a float. The amount of saturation to apply. The larger the value, the more saturated the result. + * `brightness` a float. The amount of brightness to apply. The larger the value, the brighter the result. + * `contrast` a float. The amount of contrast to apply. The larger the value, the more contrast in the resulting image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorControls', attributes=dict( - saturation=saturation, - brightness=brightness, - contrast=contrast + inputSaturation=saturation, + inputBrightness=brightness, + inputContrast=contrast ) ) self._addFilter(filterDict) @@ -1109,40 +1088,18 @@ def colorCrossPolynomial(self, redCoefficients: tuple = (1.0, 0.0, 0.0, 0.0, 0.0 **Arguments:** - `redCoefficients` a tuple (x, y, w, h). Polynomial coefficients for red channel. - `greenCoefficients` a tuple (x, y, w, h). Polynomial coefficients for green channel. - `blueCoefficients` a tuple (x, y, w, h). Polynomial coefficients for blue channel. + * `redCoefficients` a tuple (x, y, w, h). Polynomial coefficients for red channel. + * `greenCoefficients` a tuple (x, y, w, h). Polynomial coefficients for green channel. + * `blueCoefficients` a tuple (x, y, w, h). Polynomial coefficients for blue channel. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorCrossPolynomial', attributes=dict( - redCoefficients=AppKit.CIVector.vectorWithValues_count_(redCoefficients, 4), - greenCoefficients=AppKit.CIVector.vectorWithValues_count_(greenCoefficients, 4), - blueCoefficients=AppKit.CIVector.vectorWithValues_count_(blueCoefficients, 4) - ) - ) - self._addFilter(filterDict) - - def colorCurves(self, colorSpace, curvesData: bytes | None = None, curvesDomain: Point = (0.0, 1.0)): - """ - Uses a three-channel one-dimensional color table to transform the source image pixels. - - **Arguments:** - - `colorSpace` a CoreGraphics color space. The color space that defines the RGB values in the color table. - `curvesData` a float. Data containing a color table of floating-point RGB values. - `curvesDomain` a float. A two-element vector that defines the minimum and maximum RGB component values that are used to look up result values from the color table. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIColorCurves', - attributes=dict( - colorSpace=colorSpace, - curvesData=curvesData, - curvesDomain=curvesDomain + inputRedCoefficients=AppKit.CIVector.vectorWithValues_count_(redCoefficients, 4), + inputGreenCoefficients=AppKit.CIVector.vectorWithValues_count_(greenCoefficients, 4), + inputBlueCoefficients=AppKit.CIVector.vectorWithValues_count_(blueCoefficients, 4) ) ) self._addFilter(filterDict) @@ -1153,14 +1110,14 @@ def colorDodgeBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorDodgeBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -1182,14 +1139,14 @@ def colorMap(self, gradientImage: Self): **Arguments:** - `gradientImage` an Image object. The image data from this image transforms the source image values. + * `gradientImage` an Image object. The image data from this image transforms the source image values. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorMap', attributes=dict( - gradientImage=gradientImage + inputGradientImage=gradientImage._ciImage() ) ) self._addFilter(filterDict) @@ -1200,22 +1157,22 @@ def colorMatrix(self, RVector: BoundingBox = (1.0, 0.0, 0.0, 0.0), GVector: Boun **Arguments:** - `RVector` a tuple (x, y, w, h). The amount of red to multiply the source color values by. - `GVector` a tuple (x, y, w, h). The amount of green to multiply the source color values by. - `BVector` a tuple (x, y, w, h). The amount of blue to multiply the source color values by. - `AVector` a tuple (x, y, w, h). The amount of alpha to multiply the source color values by. - `biasVector` a tuple (x, y, w, h). A vector that’s added to each color component. + * `RVector` a tuple (x, y, w, h). The amount of red to multiply the source color values by. + * `GVector` a tuple (x, y, w, h). The amount of green to multiply the source color values by. + * `BVector` a tuple (x, y, w, h). The amount of blue to multiply the source color values by. + * `AVector` a tuple (x, y, w, h). The amount of alpha to multiply the source color values by. + * `biasVector` a tuple (x, y, w, h). A vector that’s added to each color component. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorMatrix', attributes=dict( - RVector=AppKit.CIVector.vectorWithValues_count_(RVector, 4), - GVector=AppKit.CIVector.vectorWithValues_count_(GVector, 4), - BVector=AppKit.CIVector.vectorWithValues_count_(BVector, 4), - AVector=AppKit.CIVector.vectorWithValues_count_(AVector, 4), - biasVector=AppKit.CIVector.vectorWithValues_count_(biasVector, 4) + inputRVector=AppKit.CIVector.vectorWithValues_count_(RVector, 4), + inputGVector=AppKit.CIVector.vectorWithValues_count_(GVector, 4), + inputBVector=AppKit.CIVector.vectorWithValues_count_(BVector, 4), + inputAVector=AppKit.CIVector.vectorWithValues_count_(AVector, 4), + inputBiasVector=AppKit.CIVector.vectorWithValues_count_(biasVector, 4) ) ) self._addFilter(filterDict) @@ -1226,16 +1183,16 @@ def colorMonochrome(self, color: RGBAColorTuple = (0.6, 0.45, 0.3, 1.0), intensi **Arguments:** - `color` RGBA tuple Color (r, g, b, a). The monochrome color to apply to the image. - `intensity` a float. The intensity of the monochrome effect. A value of 1.0 creates a monochrome image using the supplied color. A value of 0.0 has no effect on the image. + * `color` RGBA tuple Color (r, g, b, a). The monochrome color to apply to the image. + * `intensity` a float. The intensity of the monochrome effect. A value of 1.0 creates a monochrome image using the supplied color. A value of 0.0 has no effect on the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorMonochrome', attributes=dict( - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), - intensity=intensity + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), + inputIntensity=intensity ) ) self._addFilter(filterDict) @@ -1246,20 +1203,20 @@ def colorPolynomial(self, redCoefficients: BoundingBox = (0.0, 1.0, 0.0, 0.0), g **Arguments:** - `redCoefficients` a tuple (x, y, w, h). Polynomial coefficients for red channel. - `greenCoefficients` a tuple (x, y, w, h). Polynomial coefficients for green channel. - `blueCoefficients` a tuple (x, y, w, h). Polynomial coefficients for blue channel. - `alphaCoefficients` a tuple (x, y, w, h). Polynomial coefficients for alpha channel. + * `redCoefficients` a tuple (x, y, w, h). Polynomial coefficients for red channel. + * `greenCoefficients` a tuple (x, y, w, h). Polynomial coefficients for green channel. + * `blueCoefficients` a tuple (x, y, w, h). Polynomial coefficients for blue channel. + * `alphaCoefficients` a tuple (x, y, w, h). Polynomial coefficients for alpha channel. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorPolynomial', attributes=dict( - redCoefficients=AppKit.CIVector.vectorWithValues_count_(redCoefficients, 4), - greenCoefficients=AppKit.CIVector.vectorWithValues_count_(greenCoefficients, 4), - blueCoefficients=AppKit.CIVector.vectorWithValues_count_(blueCoefficients, 4), - alphaCoefficients=AppKit.CIVector.vectorWithValues_count_(alphaCoefficients, 4) + inputRedCoefficients=AppKit.CIVector.vectorWithValues_count_(redCoefficients, 4), + inputGreenCoefficients=AppKit.CIVector.vectorWithValues_count_(greenCoefficients, 4), + inputBlueCoefficients=AppKit.CIVector.vectorWithValues_count_(blueCoefficients, 4), + inputAlphaCoefficients=AppKit.CIVector.vectorWithValues_count_(alphaCoefficients, 4) ) ) self._addFilter(filterDict) @@ -1270,14 +1227,14 @@ def colorPosterize(self, levels: float = 6.0): **Arguments:** - `levels` a float. The number of brightness levels to use for each color component. Lower values result in a more extreme poster effect. + * `levels` a float. The number of brightness levels to use for each color component. Lower values result in a more extreme poster effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorPosterize', attributes=dict( - levels=levels + inputLevels=levels ) ) self._addFilter(filterDict) @@ -1288,14 +1245,14 @@ def colorThreshold(self, threshold: float = 0.5): **Arguments:** - `threshold` a float. The threshold value that governs if the RGB channels of the resulting image will be zero or one. + * `threshold` a float. The threshold value that governs if the RGB channels of the resulting image will be zero or one. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColorThreshold', attributes=dict( - threshold=threshold + inputThreshold=threshold ) ) self._addFilter(filterDict) @@ -1317,14 +1274,14 @@ def columnAverage(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. + * `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIColumnAverage', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) @@ -1346,19 +1303,19 @@ def constantColorGenerator(self, size: Size, color: RGBAColorTuple = (1.0, 0.0, **Arguments:** - `size` a tuple (w, h) - `color` RGBA tuple Color (r, g, b, a). The color to generate. + * `size` a tuple (w, h) + * `color` RGBA tuple Color (r, g, b, a). The color to generate. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIConstantColorGenerator', attributes=dict( - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def convertLabToRGB(self, normalize: bool = False): @@ -1367,14 +1324,14 @@ def convertLabToRGB(self, normalize: bool = False): **Arguments:** - `normalize` a float. If normalize is false then the L channel is in the range 0 to 100 and the a*b* channels are in the range -128 to 128. If normalize is true then the La*b* channels are in the range 0 to 1. + * `normalize` a float. If normalize is false then the L channel is in the range 0 to 100 and the a*b* channels are in the range -128 to 128. If normalize is true then the La*b* channels are in the range 0 to 1. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIConvertLabToRGB', attributes=dict( - normalize=normalize + inputNormalize=normalize ) ) self._addFilter(filterDict) @@ -1385,214 +1342,14 @@ def convertRGBtoLab(self, normalize: bool = False): **Arguments:** - `normalize` a float. If normalize is false then the L channel is in the range 0 to 100 and the a*b* channels are in the range -128 to 128. If normalize is true then the La*b* channels are in the range 0 to 1. + * `normalize` a float. If normalize is false then the L channel is in the range 0 to 100 and the a*b* channels are in the range -128 to 128. If normalize is true then the La*b* channels are in the range 0 to 1. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIConvertRGBtoLab', attributes=dict( - normalize=normalize - ) - ) - self._addFilter(filterDict) - - def convolution3X3(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Convolution with 3 by 3 matrix. - - **Arguments:** - - `weights` a float. A vector containing the 9 weights of the convolution kernel. - `bias` a float. A value that is added to the RGBA components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolution3X3', - attributes=dict( - weights=weights, - bias=bias - ) - ) - self._addFilter(filterDict) - - def convolution5X5(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Convolution with 5 by 5 matrix. - - **Arguments:** - - `weights` a float. A vector containing the 25 weights of the convolution kernel. - `bias` a float. A value that is added to the RGBA components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolution5X5', - attributes=dict( - weights=weights, - bias=bias - ) - ) - self._addFilter(filterDict) - - def convolution7X7(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Convolution with 7 by 7 matrix. - - **Arguments:** - - `weights` a float. A vector containing the 49 weights of the convolution kernel. - `bias` a float. A value that is added to the RGBA components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolution7X7', - attributes=dict( - weights=weights, - bias=bias - ) - ) - self._addFilter(filterDict) - - def convolution9Horizontal(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Horizontal Convolution with 9 values. - - **Arguments:** - - `weights` a float. A vector containing the 9 weights of the convolution kernel. - `bias` a float. A value that is added to the RGBA components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolution9Horizontal', - attributes=dict( - weights=weights, - bias=bias - ) - ) - self._addFilter(filterDict) - - def convolution9Vertical(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Vertical Convolution with 9 values. - - **Arguments:** - - `weights` a float. A vector containing the 9 weights of the convolution kernel. - `bias` a float. A value that is added to the RGBA components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolution9Vertical', - attributes=dict( - weights=weights, - bias=bias - ) - ) - self._addFilter(filterDict) - - def convolutionRGB3X3(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Convolution of RGB channels with 3 by 3 matrix. - - **Arguments:** - - `weights` a float. A vector containing the 9 weights of the convolution kernel. - `bias` a float. A value that is added to the RGB components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolutionRGB3X3', - attributes=dict( - weights=weights, - bias=bias - ) - ) - self._addFilter(filterDict) - - def convolutionRGB5X5(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Convolution of RGB channels with 5 by 5 matrix. - - **Arguments:** - - `weights` a float. A vector containing the 25 weights of the convolution kernel. - `bias` a float. A value that is added to the RGB components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolutionRGB5X5', - attributes=dict( - weights=weights, - bias=bias - ) - ) - self._addFilter(filterDict) - - def convolutionRGB7X7(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Convolution of RGB channels with 7 by 7 matrix. - - **Arguments:** - - `weights` a float. A vector containing the 49 weights of the convolution kernel. - `bias` a float. A value that is added to the RGB components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolutionRGB7X7', - attributes=dict( - weights=weights, - bias=bias - ) - ) - self._addFilter(filterDict) - - def convolutionRGB9Horizontal(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Horizontal Convolution of RGB channels with 9 values. - - **Arguments:** - - `weights` a float. A vector containing the 9 weights of the convolution kernel. - `bias` a float. A value that is added to the RGB components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolutionRGB9Horizontal', - attributes=dict( - weights=weights, - bias=bias - ) - ) - self._addFilter(filterDict) - - def convolutionRGB9Vertical(self, weights: tuple = (0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias: float = 0.0): - """ - Vertical Convolution of RGB channels with 9 values. - - **Arguments:** - - `weights` a float. A vector containing the 9 weights of the convolution kernel. - `bias` a float. A value that is added to the RGB components of the output pixel. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIConvolutionRGB9Vertical', - attributes=dict( - weights=weights, - bias=bias + inputNormalize=normalize ) ) self._addFilter(filterDict) @@ -1603,48 +1360,26 @@ def copyMachineTransition(self, targetImage: Self, extent: BoundingBox = (0.0, 0 **Arguments:** - `targetImage` an Image object. The target image for a transition. - `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. - `color` RGBA tuple Color (r, g, b, a). The color of the copier light. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). - `angle` a float in degrees. The angle in degrees of the copier light. - `width` a float. The width of the copier light. - `opacity` a float. The opacity of the copier light. A value of 0.0 is transparent. A value of 1.0 is opaque. + * `targetImage` an Image object. The target image for a transition. + * `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. + * `color` RGBA tuple Color (r, g, b, a). The color of the copier light. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `angle` a float in degrees. The angle in degrees of the copier light. + * `width` a float. The width of the copier light. + * `opacity` a float. The opacity of the copier light. A value of 0.0 is transparent. A value of 1.0 is opaque. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICopyMachineTransition', attributes=dict( - targetImage=targetImage, - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), - time=time, - angle=radians(angle), - width=width, - opacity=opacity - ) - ) - self._addFilter(filterDict) - - def coreMLModelFilter(self, model, headIndex: float = 0.0, softmaxNormalization: bool = False): - """ - Generates output image by applying input CoreML model to the input image. - - **Arguments:** - - `model` a float. The CoreML model to be used for applying effect on the image. - `headIndex` a float. A number to specify which output of a multi-head CoreML model should be used for applying effect on the image. - `softmaxNormalization` a float. A boolean value to specify that Softmax normalization should be applied to the output of the model. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CICoreMLModelFilter', - attributes=dict( - model=model, - headIndex=headIndex, - softmaxNormalization=softmaxNormalization + inputTargetImage=targetImage._ciImage(), + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), + inputTime=time, + inputAngle=radians(angle), + inputWidth=width, + inputOpacity=opacity ) ) self._addFilter(filterDict) @@ -1655,14 +1390,14 @@ def crop(self, rectangle: BoundingBox = (-8.988465674311579e+307, -8.98846567431 **Arguments:** - `rectangle` a tuple (x, y, w, h). The rectangle that specifies the crop to apply to the image. + * `rectangle` a tuple (x, y, w, h). The rectangle that specifies the crop to apply to the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICrop', attributes=dict( - rectangle=AppKit.CIVector.vectorWithValues_count_(rectangle, 4) + inputRectangle=AppKit.CIVector.vectorWithValues_count_(rectangle, 4) ) ) self._addFilter(filterDict) @@ -1673,16 +1408,16 @@ def crystallize(self, radius: float = 20.0, center: Point = (150.0, 150.0)): **Arguments:** - `radius` a float. The radius determines how many pixels are used to create the effect. The larger the radius, the larger the resulting crystals. - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius determines how many pixels are used to create the effect. The larger the radius, the larger the resulting crystals. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CICrystallize', attributes=dict( - radius=radius, - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]) + inputRadius=radius, + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]) ) ) self._addFilter(filterDict) @@ -1693,62 +1428,14 @@ def darkenBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDarkenBlendMode', attributes=dict( - backgroundImage=backgroundImage - ) - ) - self._addFilter(filterDict) - - def depthBlurEffect(self, disparityImage: Self, matteImage: Self, hairImage: Self, glassesImage: Self, gainMap: Self, focusRect, calibrationData, auxDataMetadata, shape, aperture: float = 0.0, leftEyePositions: Point = (-1.0, -1.0), rightEyePositions: Point = (-1.0, -1.0), chinPositions: Point = (-1.0, -1.0), nosePositions: Point = (-1.0, -1.0), lumaNoiseScale: float = 0.0, scaleFactor: float = 1.0): - """ - Applies a variable radius disc blur to an image where areas in the background are softened more than those in the foreground. - - **Arguments:** - - `disparityImage` an Image object. - `matteImage` an Image object. A matting image. - `hairImage` an Image object. A segmentation matte image that corresponds to people’s hair. - `glassesImage` an Image object. A segmentation matte image that corresponds to people’s glasses. - `gainMap` an Image object. - `focusRect` a float. - `calibrationData` a float. - `auxDataMetadata` a float. - `shape` a float. - `aperture` a float. - `leftEyePositions` a float. - `rightEyePositions` a float. - `chinPositions` a float. - `nosePositions` a float. - `lumaNoiseScale` a float. - `scaleFactor` a float. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIDepthBlurEffect', - attributes=dict( - disparityImage=disparityImage, - matteImage=matteImage, - hairImage=hairImage, - glassesImage=glassesImage, - gainMap=gainMap, - focusRect=focusRect, - calibrationData=calibrationData, - auxDataMetadata=auxDataMetadata, - shape=shape, - aperture=aperture, - leftEyePositions=leftEyePositions, - rightEyePositions=rightEyePositions, - chinPositions=chinPositions, - nosePositions=nosePositions, - lumaNoiseScale=lumaNoiseScale, - scaleFactor=scaleFactor + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -1759,24 +1446,24 @@ def depthOfField(self, point0: Point = (0.0, 300.0), point1: Point = (300.0, 300 **Arguments:** - `point0` a tuple (x, y). - `point1` a tuple (x, y). - `saturation` a float. The amount to adjust the saturation. - `unsharpMaskRadius` a float. - `unsharpMaskIntensity` a float. - `radius` a float. The distance from the center of the effect. + * `point0` a tuple (x, y). + * `point1` a tuple (x, y). + * `saturation` a float. The amount to adjust the saturation. + * `unsharpMaskRadius` a float. + * `unsharpMaskIntensity` a float. + * `radius` a float. The distance from the center of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDepthOfField', attributes=dict( - point0=AppKit.CIVector.vectorWithValues_count_(point0, 2), - point1=AppKit.CIVector.vectorWithValues_count_(point1, 2), - saturation=saturation, - unsharpMaskRadius=unsharpMaskRadius, - unsharpMaskIntensity=unsharpMaskIntensity, - radius=radius + inputPoint0=AppKit.CIVector.vectorWithValues_count_(point0, 2), + inputPoint1=AppKit.CIVector.vectorWithValues_count_(point1, 2), + inputSaturation=saturation, + inputUnsharpMaskRadius=unsharpMaskRadius, + inputUnsharpMaskIntensity=unsharpMaskIntensity, + inputRadius=radius ) ) self._addFilter(filterDict) @@ -1798,14 +1485,14 @@ def differenceBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDifferenceBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -1816,14 +1503,14 @@ def discBlur(self, radius: float = 8.0): **Arguments:** - `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. + * `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDiscBlur', attributes=dict( - radius=radius + inputRadius=radius ) ) self._addFilter(filterDict) @@ -1834,24 +1521,24 @@ def disintegrateWithMaskTransition(self, targetImage: Self, maskImage: Self, tim **Arguments:** - `targetImage` an Image object. The target image for a transition. - `maskImage` an Image object. An image that defines the shape to use when disintegrating from the source to the target image. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). - `shadowRadius` a float. The radius of the shadow created by the mask. - `shadowDensity` a float. The density of the shadow created by the mask. - `shadowOffset` a tuple (x, y). The offset of the shadow created by the mask. + * `targetImage` an Image object. The target image for a transition. + * `maskImage` an Image object. An image that defines the shape to use when disintegrating from the source to the target image. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `shadowRadius` a float. The radius of the shadow created by the mask. + * `shadowDensity` a float. The density of the shadow created by the mask. + * `shadowOffset` a tuple (x, y). The offset of the shadow created by the mask. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDisintegrateWithMaskTransition', attributes=dict( - targetImage=targetImage, - maskImage=maskImage, - time=time, - shadowRadius=shadowRadius, - shadowDensity=shadowDensity, - shadowOffset=AppKit.CIVector.vectorWithValues_count_(shadowOffset, 2) + inputTargetImage=targetImage._ciImage(), + inputMaskImage=maskImage._ciImage(), + inputTime=time, + inputShadowRadius=shadowRadius, + inputShadowDensity=shadowDensity, + inputShadowOffset=AppKit.CIVector.vectorWithValues_count_(shadowOffset, 2) ) ) self._addFilter(filterDict) @@ -1873,16 +1560,16 @@ def displacementDistortion(self, displacementImage: Self, scale: float = 50.0): **Arguments:** - `displacementImage` an Image object. An image whose grayscale values will be applied to the source image. - `scale` a float. The amount of texturing of the resulting image. The larger the value, the greater the texturing. + * `displacementImage` an Image object. An image whose grayscale values will be applied to the source image. + * `scale` a float. The amount of texturing of the resulting image. The larger the value, the greater the texturing. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDisplacementDistortion', attributes=dict( - displacementImage=displacementImage, - scale=scale + inputDisplacementImage=displacementImage._ciImage(), + inputScale=scale ) ) self._addFilter(filterDict) @@ -1893,16 +1580,16 @@ def dissolveTransition(self, targetImage: Self, time: float = 0.0): **Arguments:** - `targetImage` an Image object. The target image for a transition. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `targetImage` an Image object. The target image for a transition. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDissolveTransition', attributes=dict( - targetImage=targetImage, - time=time + inputTargetImage=targetImage._ciImage(), + inputTime=time ) ) self._addFilter(filterDict) @@ -1913,14 +1600,14 @@ def dither(self, intensity: float = 0.1): **Arguments:** - `intensity` a float. The intensity of the effect. + * `intensity` a float. The intensity of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDither', attributes=dict( - intensity=intensity + inputIntensity=intensity ) ) self._addFilter(filterDict) @@ -1931,14 +1618,14 @@ def divideBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDivideBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -1949,14 +1636,14 @@ def documentEnhancer(self, amount: float = 1.0): **Arguments:** - `amount` a float. The amount of enhancement. + * `amount` a float. The amount of enhancement. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDocumentEnhancer', attributes=dict( - amount=amount + inputAmount=amount ) ) self._addFilter(filterDict) @@ -1967,20 +1654,20 @@ def dotScreen(self, center: Point = (150.0, 150.0), angle: float = 0.0, width: f **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the pattern. - `width` a float. The distance between dots in the pattern. - `sharpness` a float. The sharpness of the pattern. The larger the value, the sharper the pattern. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the pattern. + * `width` a float. The distance between dots in the pattern. + * `sharpness` a float. The sharpness of the pattern. The larger the value, the sharper the pattern. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDotScreen', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width, - sharpness=sharpness + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width, + inputSharpness=sharpness ) ) self._addFilter(filterDict) @@ -1991,46 +1678,46 @@ def droste(self, insetPoint0: Point = (200.0, 200.0), insetPoint1: Point = (400. **Arguments:** - `insetPoint0` a tuple (x, y). - `insetPoint1` a tuple (x, y). - `strands` a float. - `periodicity` a float. - `rotation` a float. - `zoom` a float. + * `insetPoint0` a tuple (x, y). + * `insetPoint1` a tuple (x, y). + * `strands` a float. + * `periodicity` a float. + * `rotation` a float. + * `zoom` a float. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIDroste', attributes=dict( - insetPoint0=AppKit.CIVector.vectorWithValues_count_(insetPoint0, 2), - insetPoint1=AppKit.CIVector.vectorWithValues_count_(insetPoint1, 2), - strands=strands, - periodicity=periodicity, - rotation=rotation, - zoom=zoom + inputInsetPoint0=AppKit.CIVector.vectorWithValues_count_(insetPoint0, 2), + inputInsetPoint1=AppKit.CIVector.vectorWithValues_count_(insetPoint1, 2), + inputStrands=strands, + inputPeriodicity=periodicity, + inputRotation=radians(rotation), + inputZoom=zoom ) ) self._addFilter(filterDict) - def edgePreserveUpsampleFilter(self, smallImage, spatialSigma: float = 3.0, lumaSigma: float = 0.15): + def edgePreserveUpsampleFilter(self, smallImage: Self, spatialSigma: float = 3.0, lumaSigma: float = 0.15): """ Upsamples a small image to the size of the input image using the luminance of the input image as a guide to preserve detail. **Arguments:** - `smallImage` a float. - `spatialSigma` a float. - `lumaSigma` a float. + * `smallImage` an Image object. + * `spatialSigma` a float. + * `lumaSigma` a float. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIEdgePreserveUpsampleFilter', attributes=dict( - smallImage=smallImage, - spatialSigma=spatialSigma, - lumaSigma=lumaSigma + inputSmallImage=smallImage._ciImage(), + inputSpatialSigma=spatialSigma, + inputLumaSigma=lumaSigma ) ) self._addFilter(filterDict) @@ -2041,14 +1728,14 @@ def edges(self, intensity: float = 1.0): **Arguments:** - `intensity` a float. The intensity of the edges. The larger the value, the higher the intensity. + * `intensity` a float. The intensity of the edges. The larger the value, the higher the intensity. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIEdges', attributes=dict( - intensity=intensity + inputIntensity=intensity ) ) self._addFilter(filterDict) @@ -2059,14 +1746,14 @@ def edgeWork(self, radius: float = 3.0): **Arguments:** - `radius` a float. The thickness of the edges. The larger the value, the thicker the edges. + * `radius` a float. The thickness of the edges. The larger the value, the thicker the edges. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIEdgeWork', attributes=dict( - radius=radius + inputRadius=radius ) ) self._addFilter(filterDict) @@ -2077,18 +1764,18 @@ def eightfoldReflectedTile(self, center: Point = (150.0, 150.0), angle: float = **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `width` a float. The width of a tile. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `width` a float. The width of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIEightfoldReflectedTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width ) ) self._addFilter(filterDict) @@ -2099,14 +1786,14 @@ def exclusionBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIExclusionBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -2117,14 +1804,14 @@ def exposureAdjust(self, EV: float = 0.0): **Arguments:** - `EV` a float. The amount to adjust the exposure of the image by. The larger the value, the brighter the exposure. + * `EV` a float. The amount to adjust the exposure of the image by. The larger the value, the brighter the exposure. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIExposureAdjust', attributes=dict( - EV=EV + inputEV=EV ) ) self._addFilter(filterDict) @@ -2135,16 +1822,16 @@ def falseColor(self, color0: RGBAColorTuple = (0.3, 0.0, 0.0, 1.0), color1: RGBA **Arguments:** - `color0` RGBA tuple Color (r, g, b, a). The first color to use for the color ramp. - `color1` RGBA tuple Color (r, g, b, a). The second color to use for the color ramp. + * `color0` RGBA tuple Color (r, g, b, a). The first color to use for the color ramp. + * `color1` RGBA tuple Color (r, g, b, a). The second color to use for the color ramp. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIFalseColor', attributes=dict( - color0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), - color1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]) + inputColor0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), + inputColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]) ) ) self._addFilter(filterDict) @@ -2155,30 +1842,30 @@ def flashTransition(self, targetImage: Self, center: Point = (150.0, 150.0), ext **Arguments:** - `targetImage` an Image object. The target image for a transition. - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `extent` a tuple (x, y, w, h). The extent of the flash. - `color` RGBA tuple Color (r, g, b, a). The color of the light rays emanating from the flash. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). - `maxStriationRadius` a float. The radius of the light rays emanating from the flash. - `striationStrength` a float. The strength of the light rays emanating from the flash. - `striationContrast` a float. The contrast of the light rays emanating from the flash. - `fadeThreshold` a float. The amount of fade between the flash and the target image. The higher the value, the more flash time and the less fade time. + * `targetImage` an Image object. The target image for a transition. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `extent` a tuple (x, y, w, h). The extent of the flash. + * `color` RGBA tuple Color (r, g, b, a). The color of the light rays emanating from the flash. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `maxStriationRadius` a float. The radius of the light rays emanating from the flash. + * `striationStrength` a float. The strength of the light rays emanating from the flash. + * `striationContrast` a float. The contrast of the light rays emanating from the flash. + * `fadeThreshold` a float. The amount of fade between the flash and the target image. The higher the value, the more flash time and the less fade time. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIFlashTransition', attributes=dict( - targetImage=targetImage, - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), - time=time, - maxStriationRadius=maxStriationRadius, - striationStrength=striationStrength, - striationContrast=striationContrast, - fadeThreshold=fadeThreshold + inputTargetImage=targetImage._ciImage(), + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), + inputTime=time, + inputMaxStriationRadius=maxStriationRadius, + inputStriationStrength=striationStrength, + inputStriationContrast=striationContrast, + inputFadeThreshold=fadeThreshold ) ) self._addFilter(filterDict) @@ -2189,20 +1876,20 @@ def fourfoldReflectedTile(self, center: Point = (150.0, 150.0), angle: float = 0 **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `width` a float. The width of a tile. - `acuteAngle` a float in degrees. The primary angle for the repeating reflected tile. Small values create thin diamond tiles, and higher values create fatter reflected tiles. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `width` a float. The width of a tile. + * `acuteAngle` a float in degrees. The primary angle for the repeating reflected tile. Small values create thin diamond tiles, and higher values create fatter reflected tiles. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIFourfoldReflectedTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width, - acuteAngle=radians(acuteAngle) + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width, + inputAcuteAngle=radians(acuteAngle) ) ) self._addFilter(filterDict) @@ -2213,18 +1900,18 @@ def fourfoldRotatedTile(self, center: Point = (150.0, 150.0), angle: float = 0.0 **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `width` a float. The width of a tile. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `width` a float. The width of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIFourfoldRotatedTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width ) ) self._addFilter(filterDict) @@ -2235,20 +1922,20 @@ def fourfoldTranslatedTile(self, center: Point = (150.0, 150.0), angle: float = **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `width` a float. The width of a tile. - `acuteAngle` a float in degrees. The primary angle for the repeating translated tile. Small values create thin diamond tiles, and higher values create fatter translated tiles. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `width` a float. The width of a tile. + * `acuteAngle` a float in degrees. The primary angle for the repeating translated tile. Small values create thin diamond tiles, and higher values create fatter translated tiles. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIFourfoldTranslatedTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width, - acuteAngle=radians(acuteAngle) + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width, + inputAcuteAngle=radians(acuteAngle) ) ) self._addFilter(filterDict) @@ -2270,14 +1957,14 @@ def gammaAdjust(self, power: float = 1.0): **Arguments:** - `power` a float. A gamma value to use to correct image brightness. The larger the value, the darker the result. + * `power` a float. A gamma value to use to correct image brightness. The larger the value, the darker the result. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIGammaAdjust', attributes=dict( - power=power + inputPower=power ) ) self._addFilter(filterDict) @@ -2288,14 +1975,14 @@ def gaussianBlur(self, radius: float = 10.0): **Arguments:** - `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. + * `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIGaussianBlur', attributes=dict( - radius=radius + inputRadius=radius ) ) self._addFilter(filterDict) @@ -2306,25 +1993,25 @@ def gaussianGradient(self, size: Size, center: Point = (150.0, 150.0), color0: R **Arguments:** - `size` a tuple (w, h) - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `color0` RGBA tuple Color (r, g, b, a). The first color to use in the gradient. - `color1` RGBA tuple Color (r, g, b, a). The second color to use in the gradient. - `radius` a float. The radius of the Gaussian distribution. + * `size` a tuple (w, h) + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `color0` RGBA tuple Color (r, g, b, a). The first color to use in the gradient. + * `color1` RGBA tuple Color (r, g, b, a). The second color to use in the gradient. + * `radius` a float. The radius of the Gaussian distribution. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIGaussianGradient', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - color0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), - color1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]), - radius=radius + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputColor0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), + inputColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]), + inputRadius=radius ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def glassDistortion(self, texture: Self, center: Point = (150.0, 150.0), scale: float = 200.0): @@ -2333,18 +2020,18 @@ def glassDistortion(self, texture: Self, center: Point = (150.0, 150.0), scale: **Arguments:** - `texture` an Image object. A texture to apply to the source image. - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `scale` a float. The amount of texturing of the resulting image. The larger the value, the greater the texturing. + * `texture` an Image object. A texture to apply to the source image. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `scale` a float. The amount of texturing of the resulting image. The larger the value, the greater the texturing. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIGlassDistortion', attributes=dict( - texture=texture, - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - scale=scale + inputTexture=texture._ciImage(), + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputScale=scale ) ) self._addFilter(filterDict) @@ -2355,20 +2042,20 @@ def glassLozenge(self, point0: Point = (150.0, 150.0), point1: Point = (350.0, 1 **Arguments:** - `point0` a tuple (x, y). The x and y position that defines the center of the circle at one end of the lozenge. - `point1` a tuple (x, y). The x and y position that defines the center of the circle at the other end of the lozenge. - `radius` a float. The radius of the lozenge. The larger the radius, the wider the extent of the distortion. - `refraction` a float. The refraction of the glass. + * `point0` a tuple (x, y). The x and y position that defines the center of the circle at one end of the lozenge. + * `point1` a tuple (x, y). The x and y position that defines the center of the circle at the other end of the lozenge. + * `radius` a float. The radius of the lozenge. The larger the radius, the wider the extent of the distortion. + * `refraction` a float. The refraction of the glass. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIGlassLozenge', attributes=dict( - point0=AppKit.CIVector.vectorWithValues_count_(point0, 2), - point1=AppKit.CIVector.vectorWithValues_count_(point1, 2), - radius=radius, - refraction=refraction + inputPoint0=AppKit.CIVector.vectorWithValues_count_(point0, 2), + inputPoint1=AppKit.CIVector.vectorWithValues_count_(point1, 2), + inputRadius=radius, + inputRefraction=refraction ) ) self._addFilter(filterDict) @@ -2379,18 +2066,18 @@ def glideReflectedTile(self, center: Point = (150.0, 150.0), angle: float = 0.0, **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `width` a float. The width of a tile. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `width` a float. The width of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIGlideReflectedTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width ) ) self._addFilter(filterDict) @@ -2401,38 +2088,38 @@ def gloom(self, radius: float = 10.0, intensity: float = 0.5): **Arguments:** - `radius` a float. The radius determines how many pixels are used to create the effect. The larger the radius, the greater the effect. - `intensity` a float. The intensity of the effect. A value of 0.0 is no effect. A value of 1.0 is the maximum effect. + * `radius` a float. The radius determines how many pixels are used to create the effect. The larger the radius, the greater the effect. + * `intensity` a float. The intensity of the effect. A value of 0.0 is no effect. A value of 1.0 is the maximum effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIGloom', attributes=dict( - radius=radius, - intensity=intensity + inputRadius=radius, + inputIntensity=intensity ) ) self._addFilter(filterDict) - def guidedFilter(self, guideImage, radius: float = 1.0, epsilon: float = 0.0001): + def guidedFilter(self, guideImage: Self, radius: float = 1.0, epsilon: float = 0.0001): """ Upsamples a small image to the size of the guide image using the content of the guide to preserve detail. **Arguments:** - `guideImage` a float. A larger image to use as a guide. - `radius` a float. The distance from the center of the effect. - `epsilon` a float. + * `guideImage` an Image object. A larger image to use as a guide. + * `radius` a float. The distance from the center of the effect. + * `epsilon` a float. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIGuidedFilter', attributes=dict( - guideImage=guideImage, - radius=radius, - epsilon=epsilon + inputGuideImage=guideImage._ciImage(), + inputRadius=radius, + inputEpsilon=epsilon ) ) self._addFilter(filterDict) @@ -2443,14 +2130,14 @@ def hardLightBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIHardLightBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -2461,20 +2148,20 @@ def hatchedScreen(self, center: Point = (150.0, 150.0), angle: float = 0.0, widt **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the pattern. - `width` a float. The distance between lines in the pattern. - `sharpness` a float. The amount of sharpening to apply. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the pattern. + * `width` a float. The distance between lines in the pattern. + * `sharpness` a float. The amount of sharpening to apply. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIHatchedScreen', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width, - sharpness=sharpness + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width, + inputSharpness=sharpness ) ) self._addFilter(filterDict) @@ -2485,14 +2172,14 @@ def heightFieldFromMask(self, radius: float = 10.0): **Arguments:** - `radius` a float. The distance from the edge of the mask for the smooth transition is proportional to the input radius. Larger values make the transition smoother and more pronounced. Smaller values make the transition approximate a fillet radius. + * `radius` a float. The distance from the edge of the mask for the smooth transition is proportional to the input radius. Larger values make the transition smoother and more pronounced. Smaller values make the transition approximate a fillet radius. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIHeightFieldFromMask', attributes=dict( - radius=radius + inputRadius=radius ) ) self._addFilter(filterDict) @@ -2503,16 +2190,16 @@ def hexagonalPixellate(self, center: Point = (150.0, 150.0), scale: float = 8.0) **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `scale` a float. The scale determines the size of the hexagons. Larger values result in larger hexagons. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `scale` a float. The scale determines the size of the hexagons. Larger values result in larger hexagons. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIHexagonalPixellate', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - scale=scale + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputScale=scale ) ) self._addFilter(filterDict) @@ -2523,18 +2210,18 @@ def highlightShadowAdjust(self, radius: float = 0.0, shadowAmount: float = 0.0, **Arguments:** - `radius` a float. Shadow Highlight Radius. - `shadowAmount` a float. The amount of adjustment to the shadows of the image. - `highlightAmount` a float. The amount of adjustment to the highlights of the image. + * `radius` a float. Shadow Highlight Radius. + * `shadowAmount` a float. The amount of adjustment to the shadows of the image. + * `highlightAmount` a float. The amount of adjustment to the highlights of the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIHighlightShadowAdjust', attributes=dict( - radius=radius, - shadowAmount=shadowAmount, - highlightAmount=highlightAmount + inputRadius=radius, + inputShadowAmount=shadowAmount, + inputHighlightAmount=highlightAmount ) ) self._addFilter(filterDict) @@ -2545,18 +2232,18 @@ def histogramDisplayFilter(self, height: float = 100.0, highLimit: float = 1.0, **Arguments:** - `height` a float. The height of the displayable histogram image. - `highLimit` a float. The fraction of the right portion of the histogram image to make lighter. - `lowLimit` a float. The fraction of the left portion of the histogram image to make darker. + * `height` a float. The height of the displayable histogram image. + * `highLimit` a float. The fraction of the right portion of the histogram image to make lighter. + * `lowLimit` a float. The fraction of the left portion of the histogram image to make darker. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIHistogramDisplayFilter', attributes=dict( - height=height, - highLimit=highLimit, - lowLimit=lowLimit + inputHeight=height, + inputHighLimit=highLimit, + inputLowLimit=lowLimit ) ) self._addFilter(filterDict) @@ -2567,16 +2254,16 @@ def holeDistortion(self, center: Point = (150.0, 150.0), radius: float = 150.0): **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIHoleDistortion', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius=radius + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius ) ) self._addFilter(filterDict) @@ -2587,14 +2274,14 @@ def hueAdjust(self, angle: float = 0.0): **Arguments:** - `angle` a float in degrees. An angle in degrees to use to correct the hue of an image. + * `angle` a float in degrees. An angle in degrees to use to correct the hue of an image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIHueAdjust', attributes=dict( - angle=radians(angle) + inputAngle=radians(angle) ) ) self._addFilter(filterDict) @@ -2605,40 +2292,14 @@ def hueBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIHueBlendMode', attributes=dict( - backgroundImage=backgroundImage - ) - ) - self._addFilter(filterDict) - - def hueSaturationValueGradient(self, value: float = 1.0, radius: float = 300.0, softness: float = 1.0, dither: float = 1.0, colorSpace = None): - """ - Generates a color wheel that shows hues and saturations for a specified value. - - **Arguments:** - - `value` a float. The color value used to generate the color wheel. - `radius` a float. The distance from the center of the effect. - `softness` a float. - `dither` a float. - `colorSpace` a CoreGraphics color space. The color space that the color wheel should be generated in. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIHueSaturationValueGradient', - attributes=dict( - value=value, - radius=radius, - softness=softness, - dither=dither, - colorSpace=colorSpace + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -2649,18 +2310,18 @@ def kaleidoscope(self, count: float = 6.0, center: Point = (150.0, 150.0), angle **Arguments:** - `count` a float. The number of reflections in the pattern. - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of reflection. + * `count` a float. The number of reflections in the pattern. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of reflection. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIKaleidoscope', attributes=dict( - count=count, - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle) + inputCount=count, + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle) ) ) self._addFilter(filterDict) @@ -2671,22 +2332,22 @@ def keystoneCorrectionCombined(self, topLeft, topRight, bottomRight, bottomLeft, **Arguments:** - `topLeft` a tuple (x, y). The top left coordinate of the guide. - `topRight` a tuple (x, y). The top right coordinate of the guide. - `bottomRight` a tuple (x, y). The bottom right coordinate of the guide. - `bottomLeft` a tuple (x, y). The bottom left coordinate of the guide. - `focalLength` a float. 35mm equivalent focal length of the input image. + * `topLeft` a tuple (x, y). The top left coordinate of the guide. + * `topRight` a tuple (x, y). The top right coordinate of the guide. + * `bottomRight` a tuple (x, y). The bottom right coordinate of the guide. + * `bottomLeft` a tuple (x, y). The bottom left coordinate of the guide. + * `focalLength` a float. 35mm equivalent focal length of the input image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIKeystoneCorrectionCombined', attributes=dict( - topLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), - topRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), - bottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), - bottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2), - focalLength=focalLength + inputTopLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), + inputTopRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), + inputBottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), + inputBottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2), + inputFocalLength=focalLength ) ) self._addFilter(filterDict) @@ -2697,22 +2358,22 @@ def keystoneCorrectionHorizontal(self, topLeft, topRight, bottomRight, bottomLef **Arguments:** - `topLeft` a tuple (x, y). The top left coordinate of the guide. - `topRight` a tuple (x, y). The top right coordinate of the guide. - `bottomRight` a tuple (x, y). The bottom right coordinate of the guide. - `bottomLeft` a tuple (x, y). The bottom left coordinate of the guide. - `focalLength` a float. 35mm equivalent focal length of the input image. + * `topLeft` a tuple (x, y). The top left coordinate of the guide. + * `topRight` a tuple (x, y). The top right coordinate of the guide. + * `bottomRight` a tuple (x, y). The bottom right coordinate of the guide. + * `bottomLeft` a tuple (x, y). The bottom left coordinate of the guide. + * `focalLength` a float. 35mm equivalent focal length of the input image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIKeystoneCorrectionHorizontal', attributes=dict( - topLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), - topRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), - bottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), - bottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2), - focalLength=focalLength + inputTopLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), + inputTopRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), + inputBottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), + inputBottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2), + inputFocalLength=focalLength ) ) self._addFilter(filterDict) @@ -2723,22 +2384,22 @@ def keystoneCorrectionVertical(self, topLeft, topRight, bottomRight, bottomLeft, **Arguments:** - `topLeft` a tuple (x, y). The top left coordinate of the guide. - `topRight` a tuple (x, y). The top right coordinate of the guide. - `bottomRight` a tuple (x, y). The bottom right coordinate of the guide. - `bottomLeft` a tuple (x, y). The bottom left coordinate of the guide. - `focalLength` a float. 35mm equivalent focal length of the input image. + * `topLeft` a tuple (x, y). The top left coordinate of the guide. + * `topRight` a tuple (x, y). The top right coordinate of the guide. + * `bottomRight` a tuple (x, y). The bottom right coordinate of the guide. + * `bottomLeft` a tuple (x, y). The bottom left coordinate of the guide. + * `focalLength` a float. 35mm equivalent focal length of the input image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIKeystoneCorrectionVertical', attributes=dict( - topLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), - topRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), - bottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), - bottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2), - focalLength=focalLength + inputTopLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), + inputTopRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), + inputBottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), + inputBottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2), + inputFocalLength=focalLength ) ) self._addFilter(filterDict) @@ -2749,22 +2410,22 @@ def KMeans(self, means, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0), count: fl **Arguments:** - `means` a float. Specifies the color seeds to use for k-means clustering, either passed as an image or an array of colors. - `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. - `count` a float. Specifies how many k-means color clusters should be used. - `passes` a float. Specifies how many k-means passes should be performed. - `perceptual` a float. Specifies whether the k-means color palette should be computed in a perceptual color space. + * `means` a float. Specifies the color seeds to use for k-means clustering, either passed as an image or an array of colors. + * `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. + * `count` a float. Specifies how many k-means color clusters should be used. + * `passes` a float. Specifies how many k-means passes should be performed. + * `perceptual` a float. Specifies whether the k-means color palette should be computed in a perceptual color space. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIKMeans', attributes=dict( - means=means, - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - count=count, - passes=passes, - perceptual=perceptual + inputMeans=means, + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputCount=count, + inputPasses=passes, + inputPerceptual=perceptual ) ) self._addFilter(filterDict) @@ -2775,14 +2436,14 @@ def labDeltaE(self, image2): **Arguments:** - `image2` a float. The second input image for comparison. + * `image2` a float. The second input image for comparison. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILabDeltaE', attributes=dict( - image2=image2 + inputImage2=image2 ) ) self._addFilter(filterDict) @@ -2793,16 +2454,16 @@ def lanczosScaleTransform(self, scale: float = 1.0, aspectRatio: float = 1.0): **Arguments:** - `scale` a float. The scaling factor to use on the image. Values less than 1.0 scale down the images. Values greater than 1.0 scale up the image. - `aspectRatio` a float. The additional horizontal scaling factor to use on the image. + * `scale` a float. The scaling factor to use on the image. Values less than 1.0 scale down the images. Values greater than 1.0 scale up the image. + * `aspectRatio` a float. The additional horizontal scaling factor to use on the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILanczosScaleTransform', attributes=dict( - scale=scale, - aspectRatio=aspectRatio + inputScale=scale, + inputAspectRatio=aspectRatio ) ) self._addFilter(filterDict) @@ -2813,33 +2474,33 @@ def lenticularHaloGenerator(self, size: Size, center: Point = (150.0, 150.0), co **Arguments:** - `size` a tuple (w, h) - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `color` RGBA tuple Color (r, g, b, a). A color. - `haloRadius` a float. The radius of the halo. - `haloWidth` a float. The width of the halo, from its inner radius to its outer radius. - `haloOverlap` a float. - `striationStrength` a float. The intensity of the halo colors. Larger values are more intense. - `striationContrast` a float. The contrast of the halo colors. Larger values are higher contrast. - `time` a float. The duration of the effect. + * `size` a tuple (w, h) + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `color` RGBA tuple Color (r, g, b, a). A color. + * `haloRadius` a float. The radius of the halo. + * `haloWidth` a float. The width of the halo, from its inner radius to its outer radius. + * `haloOverlap` a float. + * `striationStrength` a float. The intensity of the halo colors. Larger values are more intense. + * `striationContrast` a float. The contrast of the halo colors. Larger values are higher contrast. + * `time` a float. The duration of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILenticularHaloGenerator', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), - haloRadius=haloRadius, - haloWidth=haloWidth, - haloOverlap=haloOverlap, - striationStrength=striationStrength, - striationContrast=striationContrast, - time=time + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), + inputHaloRadius=haloRadius, + inputHaloWidth=haloWidth, + inputHaloOverlap=haloOverlap, + inputStriationStrength=striationStrength, + inputStriationContrast=striationContrast, + inputTime=time ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def lightenBlendMode(self, backgroundImage: Self): @@ -2848,14 +2509,14 @@ def lightenBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILightenBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -2866,18 +2527,18 @@ def lightTunnel(self, center: Point = (150.0, 150.0), rotation: float = 0.0, rad **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `rotation` a float. Rotation angle in degrees of the light tunnel. - `radius` a float. Center radius of the light tunnel. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `rotation` a float. Rotation angle in degrees of the light tunnel. + * `radius` a float. Center radius of the light tunnel. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILightTunnel', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - rotation=rotation, - radius=radius + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRotation=radians(rotation), + inputRadius=radius ) ) self._addFilter(filterDict) @@ -2888,14 +2549,14 @@ def linearBurnBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILinearBurnBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -2906,14 +2567,14 @@ def linearDodgeBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILinearDodgeBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -2924,25 +2585,25 @@ def linearGradient(self, size: Size, point0: Point = (0.0, 0.0), point1: Point = **Arguments:** - `size` a tuple (w, h) - `point0` a tuple (x, y). The starting position of the gradient -- where the first color begins. - `point1` a tuple (x, y). The ending position of the gradient -- where the second color begins. - `color0` RGBA tuple Color (r, g, b, a). The first color to use in the gradient. - `color1` RGBA tuple Color (r, g, b, a). The second color to use in the gradient. + * `size` a tuple (w, h) + * `point0` a tuple (x, y). The starting position of the gradient -- where the first color begins. + * `point1` a tuple (x, y). The ending position of the gradient -- where the second color begins. + * `color0` RGBA tuple Color (r, g, b, a). The first color to use in the gradient. + * `color1` RGBA tuple Color (r, g, b, a). The second color to use in the gradient. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILinearGradient', attributes=dict( - point0=AppKit.CIVector.vectorWithValues_count_(point0, 2), - point1=AppKit.CIVector.vectorWithValues_count_(point1, 2), - color0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), - color1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]) + inputPoint0=AppKit.CIVector.vectorWithValues_count_(point0, 2), + inputPoint1=AppKit.CIVector.vectorWithValues_count_(point1, 2), + inputColor0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), + inputColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]) ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def linearLightBlendMode(self, backgroundImage: Self): @@ -2951,14 +2612,14 @@ def linearLightBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILinearLightBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -2980,22 +2641,22 @@ def lineOverlay(self, NRNoiseLevel: float = 0.07, NRSharpness: float = 0.71, edg **Arguments:** - `NRNoiseLevel` a float. The noise level of the image (used with camera data) that gets removed before tracing the edges of the image. Increasing the noise level helps to clean up the traced edges of the image. - `NRSharpness` a float. The amount of sharpening done when removing noise in the image before tracing the edges of the image. This improves the edge acquisition. - `edgeIntensity` a float. The accentuation factor of the Sobel gradient information when tracing the edges of the image. Higher values find more edges, although typically a low value (such as 1.0) is used. - `threshold` a float. This value determines edge visibility. Larger values thin out the edges. - `contrast` a float. The amount of anti-aliasing to use on the edges produced by this filter. Higher values produce higher contrast edges (they are less anti-aliased). + * `NRNoiseLevel` a float. The noise level of the image (used with camera data) that gets removed before tracing the edges of the image. Increasing the noise level helps to clean up the traced edges of the image. + * `NRSharpness` a float. The amount of sharpening done when removing noise in the image before tracing the edges of the image. This improves the edge acquisition. + * `edgeIntensity` a float. The accentuation factor of the Sobel gradient information when tracing the edges of the image. Higher values find more edges, although typically a low value (such as 1.0) is used. + * `threshold` a float. This value determines edge visibility. Larger values thin out the edges. + * `contrast` a float. The amount of anti-aliasing to use on the edges produced by this filter. Higher values produce higher contrast edges (they are less anti-aliased). """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILineOverlay', attributes=dict( - NRNoiseLevel=NRNoiseLevel, - NRSharpness=NRSharpness, - edgeIntensity=edgeIntensity, - threshold=threshold, - contrast=contrast + inputNRNoiseLevel=NRNoiseLevel, + inputNRSharpness=NRSharpness, + inputEdgeIntensity=edgeIntensity, + inputThreshold=threshold, + inputContrast=contrast ) ) self._addFilter(filterDict) @@ -3006,20 +2667,20 @@ def lineScreen(self, center: Point = (150.0, 150.0), angle: float = 0.0, width: **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the pattern. - `width` a float. The distance between lines in the pattern. - `sharpness` a float. The sharpness of the pattern. The larger the value, the sharper the pattern. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the pattern. + * `width` a float. The distance between lines in the pattern. + * `sharpness` a float. The sharpness of the pattern. The larger the value, the sharper the pattern. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILineScreen', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width, - sharpness=sharpness + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width, + inputSharpness=sharpness ) ) self._addFilter(filterDict) @@ -3030,14 +2691,14 @@ def luminosityBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CILuminosityBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -3048,16 +2709,16 @@ def maskedVariableBlur(self, mask: Self, radius: float = 5.0): **Arguments:** - `mask` an Image object. The mask image that determines how much to blur the image. The mask’s green channel value from 0.0 to 1.0 determines if the image is not blurred or blurred by the full radius. - `radius` a float. A value that governs the maximum blur radius to apply. + * `mask` an Image object. The mask image that determines how much to blur the image. The mask’s green channel value from 0.0 to 1.0 determines if the image is not blurred or blurred by the full radius. + * `radius` a float. A value that governs the maximum blur radius to apply. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMaskedVariableBlur', attributes=dict( - mask=mask._ciImage(), - radius=radius + inputMask=mask._ciImage(), + inputRadius=radius ) ) self._addFilter(filterDict) @@ -3090,14 +2751,14 @@ def maximumCompositing(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMaximumCompositing', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -3108,23 +2769,23 @@ def meshGenerator(self, size: Size, mesh, width: float = 1.5, color: RGBAColorTu **Arguments:** - `size` a tuple (w, h) - `mesh` a float. An array of line segments stored as an array of CIVectors each containing a start point and end point. - `width` a float. The width in pixels of the effect. - `color` RGBA tuple Color (r, g, b, a). A color. + * `size` a tuple (w, h) + * `mesh` a float. An array of line segments stored as an array of CIVectors each containing a start point and end point. + * `width` a float. The width in pixels of the effect. + * `color` RGBA tuple Color (r, g, b, a). A color. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMeshGenerator', attributes=dict( - mesh=mesh, - width=width, - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) + inputMesh=mesh, + inputWidth=width, + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def minimumComponent(self): @@ -3144,14 +2805,14 @@ def minimumCompositing(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMinimumCompositing', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -3162,16 +2823,16 @@ def mix(self, backgroundImage: Self, amount: float = 1.0): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. - `amount` a float. The amount of the effect. + * `backgroundImage` an Image object. The image to use as a background image. + * `amount` a float. The amount of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMix', attributes=dict( - backgroundImage=backgroundImage, - amount=amount + inputBackgroundImage=backgroundImage._ciImage(), + inputAmount=amount ) ) self._addFilter(filterDict) @@ -3182,24 +2843,24 @@ def modTransition(self, targetImage: Self, center: Point = (150.0, 150.0), time: **Arguments:** - `targetImage` an Image object. The target image for a transition. - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). - `angle` a float in degrees. The angle in degrees of the mod hole pattern. - `radius` a float. The radius of the undistorted holes in the pattern. - `compression` a float. The amount of stretching applied to the mod hole pattern. Holes in the center are not distorted as much as those at the edge of the image. + * `targetImage` an Image object. The target image for a transition. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `angle` a float in degrees. The angle in degrees of the mod hole pattern. + * `radius` a float. The radius of the undistorted holes in the pattern. + * `compression` a float. The amount of stretching applied to the mod hole pattern. Holes in the center are not distorted as much as those at the edge of the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIModTransition', attributes=dict( - targetImage=targetImage, - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - time=time, - angle=radians(angle), - radius=radius, - compression=compression + inputTargetImage=targetImage._ciImage(), + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputTime=time, + inputAngle=radians(angle), + inputRadius=radius, + inputCompression=compression ) ) self._addFilter(filterDict) @@ -3210,14 +2871,14 @@ def morphologyGradient(self, radius: float = 5.0): **Arguments:** - `radius` a float. The desired radius of the circular morphological operation to the image. + * `radius` a float. The desired radius of the circular morphological operation to the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMorphologyGradient', attributes=dict( - radius=radius + inputRadius=radius ) ) self._addFilter(filterDict) @@ -3228,14 +2889,14 @@ def morphologyMaximum(self, radius: float = 0.0): **Arguments:** - `radius` a float. The desired radius of the circular morphological operation to the image. + * `radius` a float. The desired radius of the circular morphological operation to the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMorphologyMaximum', attributes=dict( - radius=radius + inputRadius=radius ) ) self._addFilter(filterDict) @@ -3246,14 +2907,14 @@ def morphologyMinimum(self, radius: float = 0.0): **Arguments:** - `radius` a float. The desired radius of the circular morphological operation to the image. + * `radius` a float. The desired radius of the circular morphological operation to the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMorphologyMinimum', attributes=dict( - radius=radius + inputRadius=radius ) ) self._addFilter(filterDict) @@ -3264,16 +2925,16 @@ def morphologyRectangleMaximum(self, width: float = 5.0, height: float = 5.0): **Arguments:** - `width` a float. The width in pixels of the morphological operation. The value will be rounded to the nearest odd integer. - `height` a float. The height in pixels of the morphological operation. The value will be rounded to the nearest odd integer. + * `width` a float. The width in pixels of the morphological operation. The value will be rounded to the nearest odd integer. + * `height` a float. The height in pixels of the morphological operation. The value will be rounded to the nearest odd integer. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMorphologyRectangleMaximum', attributes=dict( - width=width, - height=height + inputWidth=width, + inputHeight=height ) ) self._addFilter(filterDict) @@ -3284,16 +2945,16 @@ def morphologyRectangleMinimum(self, width: float = 5.0, height: float = 5.0): **Arguments:** - `width` a float. The width in pixels of the morphological operation. The value will be rounded to the nearest odd integer. - `height` a float. The height in pixels of the morphological operation. The value will be rounded to the nearest odd integer. + * `width` a float. The width in pixels of the morphological operation. The value will be rounded to the nearest odd integer. + * `height` a float. The height in pixels of the morphological operation. The value will be rounded to the nearest odd integer. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMorphologyRectangleMinimum', attributes=dict( - width=width, - height=height + inputWidth=width, + inputHeight=height ) ) self._addFilter(filterDict) @@ -3304,16 +2965,16 @@ def motionBlur(self, radius: float = 20.0, angle: float = 0.0): **Arguments:** - `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. - `angle` a float in degrees. The angle in degrees of the motion determines which direction the blur smears. + * `radius` a float. The radius determines how many pixels are used to create the blur. The larger the radius, the blurrier the result. + * `angle` a float in degrees. The angle in degrees of the motion determines which direction the blur smears. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMotionBlur', attributes=dict( - radius=radius, - angle=radians(angle) + inputRadius=radius, + inputAngle=radians(angle) ) ) self._addFilter(filterDict) @@ -3324,14 +2985,14 @@ def multiplyBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMultiplyBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -3342,14 +3003,14 @@ def multiplyCompositing(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIMultiplyCompositing', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -3360,18 +3021,18 @@ def ninePartStretched(self, breakpoint0: Point = (50.0, 50.0), breakpoint1: Poin **Arguments:** - `breakpoint0` a float. Lower left corner of image to retain before stretching begins. - `breakpoint1` a float. Upper right corner of image to retain after stretching ends. - `growAmount` a float. Vector indicating how much image should grow in pixels in both dimensions. + * `breakpoint0` a tuple (x, y). Lower left corner of image to retain before stretching begins. + * `breakpoint1` a tuple (x, y). Upper right corner of image to retain after stretching ends. + * `growAmount` a tuple (x, y). Vector indicating how much image should grow in pixels in both dimensions. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CINinePartStretched', attributes=dict( - breakpoint0=breakpoint0, - breakpoint1=breakpoint1, - growAmount=growAmount + inputBreakpoint0=AppKit.CIVector.vectorWithValues_count_(breakpoint0, 2), + inputBreakpoint1=AppKit.CIVector.vectorWithValues_count_(breakpoint1, 2), + inputGrowAmount=AppKit.CIVector.vectorWithValues_count_(growAmount, 2) ) ) self._addFilter(filterDict) @@ -3382,20 +3043,20 @@ def ninePartTiled(self, breakpoint0: Point = (50.0, 50.0), breakpoint1: Point = **Arguments:** - `breakpoint0` a float. Lower left corner of image to retain before tiling begins. - `breakpoint1` a float. Upper right corner of image to retain after tiling ends. - `growAmount` a float. Vector indicating how much image should grow in pixels in both dimensions. - `flipYTiles` a float. Indicates that Y-Axis flip should occur. + * `breakpoint0` a tuple (x, y). Lower left corner of image to retain before tiling begins. + * `breakpoint1` a tuple (x, y). Upper right corner of image to retain after tiling ends. + * `growAmount` a tuple (x, y). Vector indicating how much image should grow in pixels in both dimensions. + * `flipYTiles` a float. Indicates that Y-Axis flip should occur. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CINinePartTiled', attributes=dict( - breakpoint0=breakpoint0, - breakpoint1=breakpoint1, - growAmount=growAmount, - flipYTiles=flipYTiles + inputBreakpoint0=AppKit.CIVector.vectorWithValues_count_(breakpoint0, 2), + inputBreakpoint1=AppKit.CIVector.vectorWithValues_count_(breakpoint1, 2), + inputGrowAmount=AppKit.CIVector.vectorWithValues_count_(growAmount, 2), + inputFlipYTiles=flipYTiles ) ) self._addFilter(filterDict) @@ -3406,16 +3067,16 @@ def noiseReduction(self, noiseLevel: float = 0.02, sharpness: float = 0.4): **Arguments:** - `noiseLevel` a float. The amount of noise reduction. The larger the value, the more noise reduction. - `sharpness` a float. The sharpness of the final image. The larger the value, the sharper the result. + * `noiseLevel` a float. The amount of noise reduction. The larger the value, the more noise reduction. + * `sharpness` a float. The sharpness of the final image. The larger the value, the sharper the result. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CINoiseReduction', attributes=dict( - noiseLevel=noiseLevel, - sharpness=sharpness + inputNoiseLevel=noiseLevel, + inputSharpness=sharpness ) ) self._addFilter(filterDict) @@ -3426,20 +3087,20 @@ def opTile(self, center: Point = (150.0, 150.0), scale: float = 2.8, angle: floa **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `scale` a float. The scale determines the number of tiles in the effect. - `angle` a float in degrees. The angle in degrees of a tile. - `width` a float. The width of a tile. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `scale` a float. The scale determines the number of tiles in the effect. + * `angle` a float in degrees. The angle in degrees of a tile. + * `width` a float. The width of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIOpTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - scale=scale, - angle=radians(angle), - width=width + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputScale=scale, + inputAngle=radians(angle), + inputWidth=width ) ) self._addFilter(filterDict) @@ -3450,14 +3111,14 @@ def overlayBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIOverlayBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -3468,26 +3129,26 @@ def pageCurlTransition(self, targetImage: Self, backsideImage: Self, shadingImag **Arguments:** - `targetImage` an Image object. The target image for a transition. - `backsideImage` an Image object. The image that appears on the back of the source image, as the page curls to reveal the target image. - `shadingImage` an Image object. An image that looks like a shaded sphere enclosed in a square image. - `extent` a tuple (x, y, w, h). The extent of the effect. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). - `angle` a float in degrees. The angle in degrees of the curling page. - `radius` a float. The radius of the curl. + * `targetImage` an Image object. The target image for a transition. + * `backsideImage` an Image object. The image that appears on the back of the source image, as the page curls to reveal the target image. + * `shadingImage` an Image object. An image that looks like a shaded sphere enclosed in a square image. + * `extent` a tuple (x, y, w, h). The extent of the effect. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `angle` a float in degrees. The angle in degrees of the curling page. + * `radius` a float. The radius of the curl. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPageCurlTransition', attributes=dict( - targetImage=targetImage, - backsideImage=backsideImage, - shadingImage=shadingImage, - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - time=time, - angle=radians(angle), - radius=radius + inputTargetImage=targetImage._ciImage(), + inputBacksideImage=backsideImage._ciImage(), + inputShadingImage=shadingImage._ciImage(), + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputTime=time, + inputAngle=radians(angle), + inputRadius=radius ) ) self._addFilter(filterDict) @@ -3498,70 +3159,70 @@ def pageCurlWithShadowTransition(self, targetImage: Self, backsideImage: Self, e **Arguments:** - `targetImage` an Image object. The target image for a transition. - `backsideImage` an Image object. The image that appears on the back of the source image, as the page curls to reveal the target image. - `extent` a tuple (x, y, w, h). The extent of the effect. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). - `angle` a float in degrees. The angle in degrees of the curling page. - `radius` a float. The radius of the curl. - `shadowSize` a float. The maximum size in pixels of the shadow. - `shadowAmount` a float. The strength of the shadow. - `shadowExtent` a tuple (x, y, w, h). The rectagular portion of input image that will cast a shadow. + * `targetImage` an Image object. The target image for a transition. + * `backsideImage` an Image object. The image that appears on the back of the source image, as the page curls to reveal the target image. + * `extent` a tuple (x, y, w, h). The extent of the effect. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `angle` a float in degrees. The angle in degrees of the curling page. + * `radius` a float. The radius of the curl. + * `shadowSize` a float. The maximum size in pixels of the shadow. + * `shadowAmount` a float. The strength of the shadow. + * `shadowExtent` a tuple (x, y, w, h). The rectagular portion of input image that will cast a shadow. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPageCurlWithShadowTransition', attributes=dict( - targetImage=targetImage, - backsideImage=backsideImage, - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - time=time, - angle=radians(angle), - radius=radius, - shadowSize=shadowSize, - shadowAmount=shadowAmount, - shadowExtent=AppKit.CIVector.vectorWithValues_count_(shadowExtent, 4) + inputTargetImage=targetImage._ciImage(), + inputBacksideImage=backsideImage._ciImage(), + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputTime=time, + inputAngle=radians(angle), + inputRadius=radius, + inputShadowSize=shadowSize, + inputShadowAmount=shadowAmount, + inputShadowExtent=AppKit.CIVector.vectorWithValues_count_(shadowExtent, 4) ) ) self._addFilter(filterDict) - def paletteCentroid(self, paletteImage, perceptual: bool = False): + def paletteCentroid(self, paletteImage: Self, perceptual: bool = False): """ Calculate the mean (x,y) image coordinates of a color palette. **Arguments:** - `paletteImage` a float. The input color palette, obtained using "CIKMeans" filter. - `perceptual` a float. Specifies whether the color palette should be applied in a perceptual color space. + * `paletteImage` an Image object. The input color palette, obtained using "CIKMeans" filter. + * `perceptual` a float. Specifies whether the color palette should be applied in a perceptual color space. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPaletteCentroid', attributes=dict( - paletteImage=paletteImage, - perceptual=perceptual + inputPaletteImage=paletteImage._ciImage(), + inputPerceptual=perceptual ) ) self._addFilter(filterDict) - def palettize(self, paletteImage, perceptual: bool = False): + def palettize(self, paletteImage: Self, perceptual: bool = False): """ Paint an image from a color palette obtained using "CIKMeans". **Arguments:** - `paletteImage` a float. The input color palette, obtained using "CIKMeans" filter. - `perceptual` a float. Specifies whether the color palette should be applied in a perceptual color space. + * `paletteImage` an Image object. The input color palette, obtained using "CIKMeans" filter. + * `perceptual` a float. Specifies whether the color palette should be applied in a perceptual color space. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPalettize', attributes=dict( - paletteImage=paletteImage, - perceptual=perceptual + inputPaletteImage=paletteImage._ciImage(), + inputPerceptual=perceptual ) ) self._addFilter(filterDict) @@ -3572,20 +3233,20 @@ def parallelogramTile(self, center: Point = (150.0, 150.0), angle: float = 0.0, **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `acuteAngle` a float in degrees. The primary angle for the repeating parallelogram tile. Small values create thin diamond tiles, and higher values create fatter parallelogram tiles. - `width` a float. The width of a tile. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `acuteAngle` a float in degrees. The primary angle for the repeating parallelogram tile. Small values create thin diamond tiles, and higher values create fatter parallelogram tiles. + * `width` a float. The width of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIParallelogramTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - acuteAngle=radians(acuteAngle), - width=width + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputAcuteAngle=radians(acuteAngle), + inputWidth=width ) ) self._addFilter(filterDict) @@ -3596,41 +3257,41 @@ def PDF417BarcodeGenerator(self, size: Size, message: str, minWidth, maxWidth, m **Arguments:** - `size` a tuple (w, h) - `message` a string. The message to encode in the PDF417 Barcode - `minWidth` a float. The minimum width of the generated barcode in pixels. - `maxWidth` a float. The maximum width of the generated barcode in pixels. - `minHeight` a float. The minimum height of the generated barcode in pixels. - `maxHeight` a float. The maximum height of the generated barcode in pixels. - `dataColumns` a float. The number of data columns in the generated barcode - `rows` a float. The number of rows in the generated barcode - `preferredAspectRatio` a float. The preferred aspect ratio of the generated barcode - `compactionMode` a float. The compaction mode of the generated barcode. - `compactStyle` a bool. Force a compact style Aztec code to `True` or `False`. Set to `None` for automatic. - `correctionLevel` a float. The correction level ratio of the generated barcode - `alwaysSpecifyCompaction` a bool. Force compaction style to `True` or `False`. Set to `None` for automatic. + * `size` a tuple (w, h) + * `message` a string. The message to encode in the PDF417 Barcode + * `minWidth` a float. The minimum width of the generated barcode in pixels. + * `maxWidth` a float. The maximum width of the generated barcode in pixels. + * `minHeight` a float. The minimum height of the generated barcode in pixels. + * `maxHeight` a float. The maximum height of the generated barcode in pixels. + * `dataColumns` a float. The number of data columns in the generated barcode + * `rows` a float. The number of rows in the generated barcode + * `preferredAspectRatio` a float. The preferred aspect ratio of the generated barcode + * `compactionMode` a float. The compaction mode of the generated barcode. + * `compactStyle` a bool. Force a compact style Aztec code to `True` or `False`. Set to `None` for automatic. + * `correctionLevel` a float. The correction level ratio of the generated barcode + * `alwaysSpecifyCompaction` a bool. Force compaction style to `True` or `False`. Set to `None` for automatic. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPDF417BarcodeGenerator', attributes=dict( - message=AppKit.NSData.dataWithBytes_length_(message, len(message)), - minWidth=minWidth, - maxWidth=maxWidth, - minHeight=minHeight, - maxHeight=maxHeight, - dataColumns=dataColumns, - rows=rows, - preferredAspectRatio=preferredAspectRatio, - compactionMode=compactionMode, - compactStyle=compactStyle, - correctionLevel=correctionLevel, - alwaysSpecifyCompaction=alwaysSpecifyCompaction + inputMessage=AppKit.NSData.dataWithBytes_length_(message, len(message)), + inputMinWidth=minWidth, + inputMaxWidth=maxWidth, + inputMinHeight=minHeight, + inputMaxHeight=maxHeight, + inputDataColumns=dataColumns, + inputRows=rows, + inputPreferredAspectRatio=preferredAspectRatio, + inputCompactionMode=compactionMode, + inputCompactStyle=compactStyle, + inputCorrectionLevel=correctionLevel, + inputAlwaysSpecifyCompaction=alwaysSpecifyCompaction ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def personSegmentation(self, qualityLevel: float = 0.0): @@ -3639,14 +3300,14 @@ def personSegmentation(self, qualityLevel: float = 0.0): **Arguments:** - `qualityLevel` a float. Determines the size and quality of the resulting segmentation mask. The value can be a number where 0 is accurate, 1 is balanced, and 2 is fast. + * `qualityLevel` a float. Determines the size and quality of the resulting segmentation mask. The value can be a number where 0 is accurate, 1 is balanced, and 2 is fast. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPersonSegmentation', attributes=dict( - qualityLevel=qualityLevel + inputQualityLevel=qualityLevel ) ) self._addFilter(filterDict) @@ -3657,22 +3318,22 @@ def perspectiveCorrection(self, topLeft: Point = (118.0, 484.0), topRight: Point **Arguments:** - `topLeft` a tuple (x, y). The top left coordinate to be perspective corrected. - `topRight` a tuple (x, y). The top right coordinate to be perspective corrected. - `bottomRight` a tuple (x, y). The bottom right coordinate to be perspective corrected. - `bottomLeft` a tuple (x, y). The bottom left coordinate to be perspective corrected. - `crop` a float. + * `topLeft` a tuple (x, y). The top left coordinate to be perspective corrected. + * `topRight` a tuple (x, y). The top right coordinate to be perspective corrected. + * `bottomRight` a tuple (x, y). The bottom right coordinate to be perspective corrected. + * `bottomLeft` a tuple (x, y). The bottom left coordinate to be perspective corrected. + * `crop` a float. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPerspectiveCorrection', attributes=dict( - topLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), - topRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), - bottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), - bottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2), - crop=crop + inputTopLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), + inputTopRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), + inputBottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), + inputBottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2), + inputCrop=crop ) ) self._addFilter(filterDict) @@ -3683,20 +3344,20 @@ def perspectiveRotate(self, focalLength: float = 28.0, pitch: float = 0.0, yaw: **Arguments:** - `focalLength` a float. 35mm equivalent focal length of the input image. - `pitch` a float. Pitch angle in degrees. - `yaw` a float. Yaw angle in degrees. - `roll` a float. Roll angle in degrees. + * `focalLength` a float. 35mm equivalent focal length of the input image. + * `pitch` a float. Pitch angle in degrees. + * `yaw` a float. Yaw angle in degrees. + * `roll` a float. Roll angle in degrees. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPerspectiveRotate', attributes=dict( - focalLength=focalLength, - pitch=pitch, - yaw=yaw, - roll=roll + inputFocalLength=focalLength, + inputPitch=pitch, + inputYaw=yaw, + inputRoll=roll ) ) self._addFilter(filterDict) @@ -3707,20 +3368,20 @@ def perspectiveTile(self, topLeft: Point = (118.0, 484.0), topRight: Point = (64 **Arguments:** - `topLeft` a tuple (x, y). The top left coordinate of a tile. - `topRight` a tuple (x, y). The top right coordinate of a tile. - `bottomRight` a tuple (x, y). The bottom right coordinate of a tile. - `bottomLeft` a tuple (x, y). The bottom left coordinate of a tile. + * `topLeft` a tuple (x, y). The top left coordinate of a tile. + * `topRight` a tuple (x, y). The top right coordinate of a tile. + * `bottomRight` a tuple (x, y). The bottom right coordinate of a tile. + * `bottomLeft` a tuple (x, y). The bottom left coordinate of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPerspectiveTile', attributes=dict( - topLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), - topRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), - bottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), - bottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2) + inputTopLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), + inputTopRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), + inputBottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), + inputBottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2) ) ) self._addFilter(filterDict) @@ -3731,20 +3392,20 @@ def perspectiveTransform(self, topLeft: Point = (118.0, 484.0), topRight: Point **Arguments:** - `topLeft` a tuple (x, y). The top left coordinate to map the image to. - `topRight` a tuple (x, y). The top right coordinate to map the image to. - `bottomRight` a tuple (x, y). The bottom right coordinate to map the image to. - `bottomLeft` a tuple (x, y). The bottom left coordinate to map the image to. + * `topLeft` a tuple (x, y). The top left coordinate to map the image to. + * `topRight` a tuple (x, y). The top right coordinate to map the image to. + * `bottomRight` a tuple (x, y). The bottom right coordinate to map the image to. + * `bottomLeft` a tuple (x, y). The bottom left coordinate to map the image to. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPerspectiveTransform', attributes=dict( - topLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), - topRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), - bottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), - bottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2) + inputTopLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), + inputTopRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), + inputBottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), + inputBottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2) ) ) self._addFilter(filterDict) @@ -3755,22 +3416,22 @@ def perspectiveTransformWithExtent(self, extent: BoundingBox = (0.0, 0.0, 300.0, **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. - `topLeft` a tuple (x, y). The top left coordinate to map the image to. - `topRight` a tuple (x, y). The top right coordinate to map the image to. - `bottomRight` a tuple (x, y). The bottom right coordinate to map the image to. - `bottomLeft` a tuple (x, y). The bottom left coordinate to map the image to. + * `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. + * `topLeft` a tuple (x, y). The top left coordinate to map the image to. + * `topRight` a tuple (x, y). The top right coordinate to map the image to. + * `bottomRight` a tuple (x, y). The bottom right coordinate to map the image to. + * `bottomLeft` a tuple (x, y). The bottom left coordinate to map the image to. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPerspectiveTransformWithExtent', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - topLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), - topRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), - bottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), - bottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputTopLeft=AppKit.CIVector.vectorWithValues_count_(topLeft, 2), + inputTopRight=AppKit.CIVector.vectorWithValues_count_(topRight, 2), + inputBottomRight=AppKit.CIVector.vectorWithValues_count_(bottomRight, 2), + inputBottomLeft=AppKit.CIVector.vectorWithValues_count_(bottomLeft, 2) ) ) self._addFilter(filterDict) @@ -3781,14 +3442,14 @@ def photoEffectChrome(self, extrapolate: bool = False): **Arguments:** - `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. + * `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPhotoEffectChrome', attributes=dict( - extrapolate=extrapolate + inputExtrapolate=extrapolate ) ) self._addFilter(filterDict) @@ -3799,14 +3460,14 @@ def photoEffectFade(self, extrapolate: bool = False): **Arguments:** - `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. + * `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPhotoEffectFade', attributes=dict( - extrapolate=extrapolate + inputExtrapolate=extrapolate ) ) self._addFilter(filterDict) @@ -3817,14 +3478,14 @@ def photoEffectInstant(self, extrapolate: bool = False): **Arguments:** - `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. + * `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPhotoEffectInstant', attributes=dict( - extrapolate=extrapolate + inputExtrapolate=extrapolate ) ) self._addFilter(filterDict) @@ -3835,14 +3496,14 @@ def photoEffectMono(self, extrapolate: bool = False): **Arguments:** - `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. + * `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPhotoEffectMono', attributes=dict( - extrapolate=extrapolate + inputExtrapolate=extrapolate ) ) self._addFilter(filterDict) @@ -3853,14 +3514,14 @@ def photoEffectNoir(self, extrapolate: bool = False): **Arguments:** - `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. + * `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPhotoEffectNoir', attributes=dict( - extrapolate=extrapolate + inputExtrapolate=extrapolate ) ) self._addFilter(filterDict) @@ -3871,14 +3532,14 @@ def photoEffectProcess(self, extrapolate: bool = False): **Arguments:** - `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. + * `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPhotoEffectProcess', attributes=dict( - extrapolate=extrapolate + inputExtrapolate=extrapolate ) ) self._addFilter(filterDict) @@ -3889,14 +3550,14 @@ def photoEffectTonal(self, extrapolate: bool = False): **Arguments:** - `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. + * `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPhotoEffectTonal', attributes=dict( - extrapolate=extrapolate + inputExtrapolate=extrapolate ) ) self._addFilter(filterDict) @@ -3907,14 +3568,14 @@ def photoEffectTransfer(self, extrapolate: bool = False): **Arguments:** - `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. + * `extrapolate` a float. If true, then the color effect will be extrapolated if the input image contains RGB component values outside the range 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPhotoEffectTransfer', attributes=dict( - extrapolate=extrapolate + inputExtrapolate=extrapolate ) ) self._addFilter(filterDict) @@ -3925,18 +3586,18 @@ def pinchDistortion(self, center: Point = (150.0, 150.0), radius: float = 300.0, **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. - `scale` a float. The amount of pinching. A value of 0.0 has no effect. A value of 1.0 is the maximum pinch. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. + * `scale` a float. The amount of pinching. A value of 0.0 has no effect. A value of 1.0 is the maximum pinch. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPinchDistortion', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius=radius, - scale=scale + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius, + inputScale=scale ) ) self._addFilter(filterDict) @@ -3947,14 +3608,14 @@ def pinLightBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPinLightBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -3965,16 +3626,16 @@ def pixellate(self, center: Point = (150.0, 150.0), scale: float = 8.0): **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `scale` a float. The scale determines the size of the squares. Larger values result in larger squares. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `scale` a float. The scale determines the size of the squares. Larger values result in larger squares. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPixellate', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - scale=scale + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputScale=scale ) ) self._addFilter(filterDict) @@ -3985,16 +3646,16 @@ def pointillize(self, radius: float = 20.0, center: Point = (150.0, 150.0)): **Arguments:** - `radius` a float. The radius of the circles in the resulting pattern. - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius of the circles in the resulting pattern. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIPointillize', attributes=dict( - radius=radius, - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]) + inputRadius=radius, + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]) ) ) self._addFilter(filterDict) @@ -4005,22 +3666,22 @@ def QRCodeGenerator(self, size: Size, message: str, correctionLevel: str = 'M'): **Arguments:** - `size` a tuple (w, h) - `message` a string. The message to encode in the QR Code - `correctionLevel` a string. QR Code correction level L, M, Q, or H. + * `size` a tuple (w, h) + * `message` a string. The message to encode in the QR Code + * `correctionLevel` a string. QR Code correction level L, M, Q, or H. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIQRCodeGenerator', attributes=dict( - message=AppKit.NSData.dataWithBytes_length_(message, len(message)), - correctionLevel=correctionLevel + inputMessage=AppKit.NSData.dataWithBytes_length_(message, len(message)), + inputCorrectionLevel=correctionLevel ), size=size, isGenerator=True, fitImage=True - ), + ) self._addFilter(filterDict) def radialGradient(self, size: Size, center: Point = (150.0, 150.0), radius0: float = 5.0, radius1: float = 100.0, color0: RGBAColorTuple = (1.0, 1.0, 1.0, 1.0), color1: RGBAColorTuple = (0.0, 0.0, 0.0, 1.0)): @@ -4029,27 +3690,27 @@ def radialGradient(self, size: Size, center: Point = (150.0, 150.0), radius0: fl **Arguments:** - `size` a tuple (w, h) - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius0` a float. The radius of the starting circle to use in the gradient. - `radius1` a float. The radius of the ending circle to use in the gradient. - `color0` RGBA tuple Color (r, g, b, a). The first color to use in the gradient. - `color1` RGBA tuple Color (r, g, b, a). The second color to use in the gradient. + * `size` a tuple (w, h) + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius0` a float. The radius of the starting circle to use in the gradient. + * `radius1` a float. The radius of the ending circle to use in the gradient. + * `color0` RGBA tuple Color (r, g, b, a). The first color to use in the gradient. + * `color1` RGBA tuple Color (r, g, b, a). The second color to use in the gradient. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIRadialGradient', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius0=radius0, - radius1=radius1, - color0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), - color1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]) + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius0=radius0, + inputRadius1=radius1, + inputColor0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), + inputColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]) ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def randomGenerator(self, size: Size): @@ -4058,7 +3719,7 @@ def randomGenerator(self, size: Size): **Arguments:** - `size` a tuple (w, h) + * `size` a tuple (w, h) """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future @@ -4075,26 +3736,26 @@ def rippleTransition(self, targetImage: Self, shadingImage: Self, center: Point **Arguments:** - `targetImage` an Image object. The target image for a transition. - `shadingImage` an Image object. An image that looks like a shaded sphere enclosed in a square image. - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). - `width` a float. The width of the ripple. - `scale` a float. A value that determines whether the ripple starts as a bulge (higher value) or a dimple (lower value). + * `targetImage` an Image object. The target image for a transition. + * `shadingImage` an Image object. An image that looks like a shaded sphere enclosed in a square image. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `width` a float. The width of the ripple. + * `scale` a float. A value that determines whether the ripple starts as a bulge (higher value) or a dimple (lower value). """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIRippleTransition', attributes=dict( - targetImage=targetImage, - shadingImage=shadingImage, - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - time=time, - width=width, - scale=scale + inputTargetImage=targetImage._ciImage(), + inputShadingImage=shadingImage._ciImage(), + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputTime=time, + inputWidth=width, + inputScale=scale ) ) self._addFilter(filterDict) @@ -4105,23 +3766,23 @@ def roundedRectangleGenerator(self, size: Size, extent: BoundingBox = (0.0, 0.0, **Arguments:** - `size` a tuple (w, h) - `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. - `radius` a float. The distance from the center of the effect. - `color` RGBA tuple Color (r, g, b, a). A color. + * `size` a tuple (w, h) + * `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. + * `radius` a float. The distance from the center of the effect. + * `color` RGBA tuple Color (r, g, b, a). A color. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIRoundedRectangleGenerator', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - radius=radius, - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputRadius=radius, + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def roundedRectangleStrokeGenerator(self, size: Size, extent: BoundingBox = (0.0, 0.0, 100.0, 100.0), radius: float = 10.0, color: RGBAColorTuple = (1.0, 1.0, 1.0, 1.0), width: float = 10.0): @@ -4130,25 +3791,25 @@ def roundedRectangleStrokeGenerator(self, size: Size, extent: BoundingBox = (0.0 **Arguments:** - `size` a tuple (w, h) - `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. - `radius` a float. The distance from the center of the effect. - `color` RGBA tuple Color (r, g, b, a). A color. - `width` a float. The width in pixels of the effect. + * `size` a tuple (w, h) + * `extent` a tuple (x, y, w, h). A rectangle that defines the extent of the effect. + * `radius` a float. The distance from the center of the effect. + * `color` RGBA tuple Color (r, g, b, a). A color. + * `width` a float. The width in pixels of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIRoundedRectangleStrokeGenerator', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - radius=radius, - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), - width=width + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputRadius=radius, + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), + inputWidth=width ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def rowAverage(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): @@ -4157,14 +3818,14 @@ def rowAverage(self, extent: BoundingBox = (0.0, 0.0, 640.0, 80.0)): **Arguments:** - `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. + * `extent` a tuple (x, y, w, h). A rectangle that specifies the subregion of the image that you want to process. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIRowAverage', attributes=dict( - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4) + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4) ) ) self._addFilter(filterDict) @@ -4197,14 +3858,14 @@ def saturationBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISaturationBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -4215,14 +3876,14 @@ def screenBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIScreenBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -4233,14 +3894,14 @@ def sepiaTone(self, intensity: float = 1.0): **Arguments:** - `intensity` a float. The intensity of the sepia effect. A value of 1.0 creates a monochrome sepia image. A value of 0.0 has no effect on the image. + * `intensity` a float. The intensity of the sepia effect. A value of 1.0 creates a monochrome sepia image. A value of 0.0 has no effect on the image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISepiaTone', attributes=dict( - intensity=intensity + inputIntensity=intensity ) ) self._addFilter(filterDict) @@ -4251,16 +3912,16 @@ def shadedMaterial(self, shadingImage: Self, scale: float = 10.0): **Arguments:** - `shadingImage` an Image object. The image to use as the height field. The resulting image has greater heights with lighter shades, and lesser heights (lower areas) with darker shades. - `scale` a float. The scale of the effect. The higher the value, the more dramatic the effect. + * `shadingImage` an Image object. The image to use as the height field. The resulting image has greater heights with lighter shades, and lesser heights (lower areas) with darker shades. + * `scale` a float. The scale of the effect. The higher the value, the more dramatic the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIShadedMaterial', attributes=dict( - shadingImage=shadingImage, - scale=scale + inputShadingImage=shadingImage._ciImage(), + inputScale=scale ) ) self._addFilter(filterDict) @@ -4271,16 +3932,16 @@ def sharpenLuminance(self, sharpness: float = 0.4, radius: float = 1.69): **Arguments:** - `sharpness` a float. The amount of sharpening to apply. Larger values are sharper. - `radius` a float. The distance from the center of the effect. + * `sharpness` a float. The amount of sharpening to apply. Larger values are sharper. + * `radius` a float. The distance from the center of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISharpenLuminance', attributes=dict( - sharpness=sharpness, - radius=radius + inputSharpness=sharpness, + inputRadius=radius ) ) self._addFilter(filterDict) @@ -4291,18 +3952,18 @@ def sixfoldReflectedTile(self, center: Point = (150.0, 150.0), angle: float = 0. **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `width` a float. The width of a tile. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `width` a float. The width of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISixfoldReflectedTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width ) ) self._addFilter(filterDict) @@ -4313,18 +3974,18 @@ def sixfoldRotatedTile(self, center: Point = (150.0, 150.0), angle: float = 0.0, **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `width` a float. The width of a tile. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `width` a float. The width of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISixfoldRotatedTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width ) ) self._addFilter(filterDict) @@ -4335,25 +3996,25 @@ def smoothLinearGradient(self, size: Size, point0: Point = (0.0, 0.0), point1: P **Arguments:** - `size` a tuple (w, h) - `point0` a tuple (x, y). The starting position of the gradient -- where the first color begins. - `point1` a tuple (x, y). The ending position of the gradient -- where the second color begins. - `color0` RGBA tuple Color (r, g, b, a). The first color to use in the gradient. - `color1` RGBA tuple Color (r, g, b, a). The second color to use in the gradient. + * `size` a tuple (w, h) + * `point0` a tuple (x, y). The starting position of the gradient -- where the first color begins. + * `point1` a tuple (x, y). The ending position of the gradient -- where the second color begins. + * `color0` RGBA tuple Color (r, g, b, a). The first color to use in the gradient. + * `color1` RGBA tuple Color (r, g, b, a). The second color to use in the gradient. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISmoothLinearGradient', attributes=dict( - point0=AppKit.CIVector.vectorWithValues_count_(point0, 2), - point1=AppKit.CIVector.vectorWithValues_count_(point1, 2), - color0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), - color1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]) + inputPoint0=AppKit.CIVector.vectorWithValues_count_(point0, 2), + inputPoint1=AppKit.CIVector.vectorWithValues_count_(point1, 2), + inputColor0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), + inputColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]) ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def sobelGradients(self): @@ -4373,14 +4034,14 @@ def softLightBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISoftLightBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -4391,14 +4052,14 @@ def sourceAtopCompositing(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISourceAtopCompositing', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -4409,14 +4070,14 @@ def sourceInCompositing(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISourceInCompositing', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -4427,14 +4088,14 @@ def sourceOutCompositing(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISourceOutCompositing', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -4445,14 +4106,14 @@ def sourceOverCompositing(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISourceOverCompositing', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -4463,36 +4124,36 @@ def spotColor(self, centerColor1: RGBAColorTuple = (0.0784, 0.0627, 0.0706, 1.0) **Arguments:** - `centerColor1` RGBA tuple Color (r, g, b, a). The center value of the first color range to replace. - `replacementColor1` RGBA tuple Color (r, g, b, a). A replacement color for the first color range. - `closeness1` a float. A value that indicates how close the first color must match before it is replaced. - `contrast1` a float. The contrast of the first replacement color. - `centerColor2` RGBA tuple Color (r, g, b, a). The center value of the second color range to replace. - `replacementColor2` RGBA tuple Color (r, g, b, a). A replacement color for the second color range. - `closeness2` a float. A value that indicates how close the second color must match before it is replaced. - `contrast2` a float. The contrast of the second replacement color. - `centerColor3` RGBA tuple Color (r, g, b, a). The center value of the third color range to replace. - `replacementColor3` RGBA tuple Color (r, g, b, a). A replacement color for the third color range. - `closeness3` a float. A value that indicates how close the third color must match before it is replaced. - `contrast3` a float. The contrast of the third replacement color. + * `centerColor1` RGBA tuple Color (r, g, b, a). The center value of the first color range to replace. + * `replacementColor1` RGBA tuple Color (r, g, b, a). A replacement color for the first color range. + * `closeness1` a float. A value that indicates how close the first color must match before it is replaced. + * `contrast1` a float. The contrast of the first replacement color. + * `centerColor2` RGBA tuple Color (r, g, b, a). The center value of the second color range to replace. + * `replacementColor2` RGBA tuple Color (r, g, b, a). A replacement color for the second color range. + * `closeness2` a float. A value that indicates how close the second color must match before it is replaced. + * `contrast2` a float. The contrast of the second replacement color. + * `centerColor3` RGBA tuple Color (r, g, b, a). The center value of the third color range to replace. + * `replacementColor3` RGBA tuple Color (r, g, b, a). A replacement color for the third color range. + * `closeness3` a float. A value that indicates how close the third color must match before it is replaced. + * `contrast3` a float. The contrast of the third replacement color. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISpotColor', attributes=dict( - centerColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(centerColor1[0], centerColor1[1], centerColor1[2], centerColor1[3]), - replacementColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(replacementColor1[0], replacementColor1[1], replacementColor1[2], replacementColor1[3]), - closeness1=closeness1, - contrast1=contrast1, - centerColor2=AppKit.CIColor.colorWithRed_green_blue_alpha_(centerColor2[0], centerColor2[1], centerColor2[2], centerColor2[3]), - replacementColor2=AppKit.CIColor.colorWithRed_green_blue_alpha_(replacementColor2[0], replacementColor2[1], replacementColor2[2], replacementColor2[3]), - closeness2=closeness2, - contrast2=contrast2, - centerColor3=AppKit.CIColor.colorWithRed_green_blue_alpha_(centerColor3[0], centerColor3[1], centerColor3[2], centerColor3[3]), - replacementColor3=AppKit.CIColor.colorWithRed_green_blue_alpha_(replacementColor3[0], replacementColor3[1], replacementColor3[2], replacementColor3[3]), - closeness3=closeness3, - contrast3=contrast3 + inputCenterColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(centerColor1[0], centerColor1[1], centerColor1[2], centerColor1[3]), + inputReplacementColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(replacementColor1[0], replacementColor1[1], replacementColor1[2], replacementColor1[3]), + inputCloseness1=closeness1, + inputContrast1=contrast1, + inputCenterColor2=AppKit.CIColor.colorWithRed_green_blue_alpha_(centerColor2[0], centerColor2[1], centerColor2[2], centerColor2[3]), + inputReplacementColor2=AppKit.CIColor.colorWithRed_green_blue_alpha_(replacementColor2[0], replacementColor2[1], replacementColor2[2], replacementColor2[3]), + inputCloseness2=closeness2, + inputContrast2=contrast2, + inputCenterColor3=AppKit.CIColor.colorWithRed_green_blue_alpha_(centerColor3[0], centerColor3[1], centerColor3[2], centerColor3[3]), + inputReplacementColor3=AppKit.CIColor.colorWithRed_green_blue_alpha_(replacementColor3[0], replacementColor3[1], replacementColor3[2], replacementColor3[3]), + inputCloseness3=closeness3, + inputContrast3=contrast3 ) ) self._addFilter(filterDict) @@ -4503,22 +4164,22 @@ def spotLight(self, lightPosition: tuple = (400.0, 600.0, 150.0), lightPointsAt: **Arguments:** - `lightPosition` a tulple (x, y, z). The x and y position of the spotlight. - `lightPointsAt` a tuple (x, y). The x and y position that the spotlight points at. - `brightness` a float. The brightness of the spotlight. - `concentration` a float. The spotlight size. The smaller the value, the more tightly focused the light beam. - `color` RGBA tuple Color (r, g, b, a). The color of the spotlight. + * `lightPosition` a tulple (x, y, z). The x and y position of the spotlight. + * `lightPointsAt` a tuple (x, y). The x and y position that the spotlight points at. + * `brightness` a float. The brightness of the spotlight. + * `concentration` a float. The spotlight size. The smaller the value, the more tightly focused the light beam. + * `color` RGBA tuple Color (r, g, b, a). The color of the spotlight. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISpotLight', attributes=dict( - lightPosition=AppKit.CIVector.vectorWithValues_count_(lightPosition, 3), - lightPointsAt=AppKit.CIVector.vectorWithValues_count_(lightPointsAt, 2), - brightness=brightness, - concentration=concentration, - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) + inputLightPosition=AppKit.CIVector.vectorWithValues_count_(lightPosition, 3), + inputLightPointsAt=AppKit.CIVector.vectorWithValues_count_(lightPointsAt, 2), + inputBrightness=brightness, + inputConcentration=concentration, + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) ) ) self._addFilter(filterDict) @@ -4540,33 +4201,33 @@ def starShineGenerator(self, size: Size, center: Point = (150.0, 150.0), color: **Arguments:** - `size` a tuple (w, h) - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `color` RGBA tuple Color (r, g, b, a). The color to use for the outer shell of the circular star. - `radius` a float. The radius of the star. - `crossScale` a float. The size of the cross pattern. - `crossAngle` a float in degrees. The angle in degrees of the cross pattern. - `crossOpacity` a float. The opacity of the cross pattern. - `crossWidth` a float. The width of the cross pattern. - `epsilon` a float. The length of the cross spikes. + * `size` a tuple (w, h) + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `color` RGBA tuple Color (r, g, b, a). The color to use for the outer shell of the circular star. + * `radius` a float. The radius of the star. + * `crossScale` a float. The size of the cross pattern. + * `crossAngle` a float in degrees. The angle in degrees of the cross pattern. + * `crossOpacity` a float. The opacity of the cross pattern. + * `crossWidth` a float. The width of the cross pattern. + * `epsilon` a float. The length of the cross spikes. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIStarShineGenerator', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), - radius=radius, - crossScale=crossScale, - crossAngle=radians(crossAngle), - crossOpacity=crossOpacity, - crossWidth=crossWidth, - epsilon=epsilon + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), + inputRadius=radius, + inputCrossScale=crossScale, + inputCrossAngle=radians(crossAngle), + inputCrossOpacity=crossOpacity, + inputCrossWidth=crossWidth, + inputEpsilon=epsilon ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def straightenFilter(self, angle: float = 0.0): @@ -4575,14 +4236,14 @@ def straightenFilter(self, angle: float = 0.0): **Arguments:** - `angle` a float in degrees. The angle in degrees of the effect. + * `angle` a float in degrees. The angle in degrees of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIStraightenFilter', attributes=dict( - angle=radians(angle) + inputAngle=radians(angle) ) ) self._addFilter(filterDict) @@ -4593,18 +4254,18 @@ def stretchCrop(self, size: Point = (1280.0, 720.0), cropAmount: float = 0.25, c **Arguments:** - `size` a tuple (w, h). The size in pixels of the output image. - `cropAmount` a float. Determines if and how much cropping should be used to achieve the target size. If value is 0 then only stretching is used. If 1 then only cropping is used. - `centerStretchAmount` a float. Determine how much the center of the image is stretched if stretching is used. If value is 0 then the center of the image maintains the original aspect ratio. If 1 then the image is stretched uniformly. + * `size` a float. The size in pixels of the output image. + * `cropAmount` a float. Determines if and how much cropping should be used to achieve the target size. If value is 0 then only stretching is used. If 1 then only cropping is used. + * `centerStretchAmount` a float. Determine how much the center of the image is stretched if stretching is used. If value is 0 then the center of the image maintains the original aspect ratio. If 1 then the image is stretched uniformly. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIStretchCrop', attributes=dict( - size=size, - cropAmount=cropAmount, - centerStretchAmount=centerStretchAmount + inputSize=AppKit.CIVector.vectorWithValues_count_(size, 2), + inputCropAmount=cropAmount, + inputCenterStretchAmount=centerStretchAmount ) ) self._addFilter(filterDict) @@ -4615,27 +4276,27 @@ def stripesGenerator(self, size: Size, center: Point = (150.0, 150.0), color0: R **Arguments:** - `size` a tuple (w, h) - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `color0` RGBA tuple Color (r, g, b, a). A color to use for the odd stripes. - `color1` RGBA tuple Color (r, g, b, a). A color to use for the even stripes. - `width` a float. The width of a stripe. - `sharpness` a float. The sharpness of the stripe pattern. The smaller the value, the more blurry the pattern. Values range from 0.0 to 1.0. + * `size` a tuple (w, h) + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `color0` RGBA tuple Color (r, g, b, a). A color to use for the odd stripes. + * `color1` RGBA tuple Color (r, g, b, a). A color to use for the even stripes. + * `width` a float. The width of a stripe. + * `sharpness` a float. The sharpness of the stripe pattern. The smaller the value, the more blurry the pattern. Values range from 0.0 to 1.0. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIStripesGenerator', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - color0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), - color1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]), - width=width, - sharpness=sharpness + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputColor0=AppKit.CIColor.colorWithRed_green_blue_alpha_(color0[0], color0[1], color0[2], color0[3]), + inputColor1=AppKit.CIColor.colorWithRed_green_blue_alpha_(color1[0], color1[1], color1[2], color1[3]), + inputWidth=width, + inputSharpness=sharpness ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def subtractBlendMode(self, backgroundImage: Self): @@ -4644,14 +4305,14 @@ def subtractBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISubtractBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -4662,31 +4323,31 @@ def sunbeamsGenerator(self, size: Size, center: Point = (150.0, 150.0), color: R **Arguments:** - `size` a tuple (w, h) - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `color` RGBA tuple Color (r, g, b, a). The color of the sun. - `sunRadius` a float. The radius of the sun. - `maxStriationRadius` a float. The radius of the sunbeams. - `striationStrength` a float. The intensity of the sunbeams. Higher values result in more intensity. - `striationContrast` a float. The contrast of the sunbeams. Higher values result in more contrast. - `time` a float. The duration of the effect. + * `size` a tuple (w, h) + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `color` RGBA tuple Color (r, g, b, a). The color of the sun. + * `sunRadius` a float. The radius of the sun. + * `maxStriationRadius` a float. The radius of the sunbeams. + * `striationStrength` a float. The intensity of the sunbeams. Higher values result in more intensity. + * `striationContrast` a float. The contrast of the sunbeams. Higher values result in more contrast. + * `time` a float. The duration of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISunbeamsGenerator', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), - sunRadius=sunRadius, - maxStriationRadius=maxStriationRadius, - striationStrength=striationStrength, - striationContrast=striationContrast, - time=time + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), + inputSunRadius=sunRadius, + inputMaxStriationRadius=maxStriationRadius, + inputStriationStrength=striationStrength, + inputStriationContrast=striationContrast, + inputTime=time ), size=size, isGenerator=True - ), + ) self._addFilter(filterDict) def swipeTransition(self, targetImage: Self, extent: BoundingBox = (0.0, 0.0, 300.0, 300.0), color: RGBAColorTuple = (1.0, 1.0, 1.0, 1.0), time: float = 0.0, angle: float = 0.0, width: float = 300.0, opacity: float = 0.0): @@ -4695,26 +4356,26 @@ def swipeTransition(self, targetImage: Self, extent: BoundingBox = (0.0, 0.0, 30 **Arguments:** - `targetImage` an Image object. The target image for a transition. - `extent` a tuple (x, y, w, h). The extent of the effect. - `color` RGBA tuple Color (r, g, b, a). The color of the swipe. - `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). - `angle` a float in degrees. The angle in degrees of the swipe. - `width` a float. The width of the swipe. - `opacity` a float. The opacity of the swipe. + * `targetImage` an Image object. The target image for a transition. + * `extent` a tuple (x, y, w, h). The extent of the effect. + * `color` RGBA tuple Color (r, g, b, a). The color of the swipe. + * `time` a float. The parametric time of the transition. This value drives the transition from start (at time 0) to end (at time 1). + * `angle` a float in degrees. The angle in degrees of the swipe. + * `width` a float. The width of the swipe. + * `opacity` a float. The opacity of the swipe. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CISwipeTransition', attributes=dict( - targetImage=targetImage, - extent=AppKit.CIVector.vectorWithValues_count_(extent, 4), - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), - time=time, - angle=radians(angle), - width=width, - opacity=opacity + inputTargetImage=targetImage._ciImage(), + inputExtent=AppKit.CIVector.vectorWithValues_count_(extent, 4), + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]), + inputTime=time, + inputAngle=radians(angle), + inputWidth=width, + inputOpacity=opacity ) ) self._addFilter(filterDict) @@ -4725,49 +4386,20 @@ def temperatureAndTint(self, neutral: Point = (6500.0, 0.0), targetNeutral: Poin **Arguments:** - `neutral` a tuple. A vector containing the source white point defined by color temperature and tint or chromaticity (x,y). - `targetNeutral` a tuple. A vector containing the desired white point defined by color temperature and tint or chromaticity (x,y). + * `neutral` a tuple. A vector containing the source white point defined by color temperature and tint or chromaticity (x,y). + * `targetNeutral` a tuple. A vector containing the desired white point defined by color temperature and tint or chromaticity (x,y). """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CITemperatureAndTint', attributes=dict( - neutral=AppKit.CIVector.vectorWithValues_count_(neutral, 2), - targetNeutral=AppKit.CIVector.vectorWithValues_count_(targetNeutral, 2) + inputNeutral=AppKit.CIVector.vectorWithValues_count_(neutral, 2), + inputTargetNeutral=AppKit.CIVector.vectorWithValues_count_(targetNeutral, 2) ) ) self._addFilter(filterDict) - def textImageGenerator(self, size: Size, text: FormattedString, fontName: str = 'HelveticaNeue', fontSize: float = 12.0, scaleFactor: float = 1.0, padding: float = 0.0): - """ - Generate an image from a string and font information. - - **Arguments:** - - `size` a tuple (w, h) - `text` a `FormattedString`. The text to render. - `fontName` a float. The name of the font to use for the generated text. - `fontSize` a float. The size of the font to use for the generated text. - `scaleFactor` a float. The scale of the font to use for the generated text. - `padding` a float. The number of additional pixels to pad around the text’s bounding box. - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CITextImageGenerator', - attributes=dict( - text=text.getNSObject(), - fontName=fontName, - fontSize=fontSize, - scaleFactor=scaleFactor, - padding=padding - ), - size=size, - isGenerator=True - ), - self._addFilter(filterDict) - def thermal(self): """ Apply a "Thermal" style effect to an image. @@ -4779,52 +4411,26 @@ def thermal(self): ) self._addFilter(filterDict) - def toneCurve(self, point0: Point = (0.0, 0.0), point1: Point = (0.25, 0.25), point2: Point = (0.5, 0.5), point3: Point = (0.75, 0.75), point4: Point = (1.0, 1.0)): - """ - Adjusts tone response of the R, G, and B channels of an image. The input points are five x,y values that are interpolated using a spline curve. The curve is applied in a perceptual (gamma 2) version of the working space. - - **Arguments:** - - `point0` a tuple (x, y). - `point1` a tuple (x, y). - `point2` a tuple (x, y). - `point3` a tuple (x, y). - `point4` a tuple (x, y). - """ - # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` - # please, do not attempt to edit it manually as it will be overriden in the future - filterDict = dict( - name='CIToneCurve', - attributes=dict( - point0=AppKit.CIVector.vectorWithValues_count_(point0, 2), - point1=AppKit.CIVector.vectorWithValues_count_(point1, 2), - point2=AppKit.CIVector.vectorWithValues_count_(point2, 2), - point3=AppKit.CIVector.vectorWithValues_count_(point3, 2), - point4=AppKit.CIVector.vectorWithValues_count_(point4, 2) - ) - ) - self._addFilter(filterDict) - def torusLensDistortion(self, center: Point = (150.0, 150.0), radius: float = 160.0, width: float = 80.0, refraction: float = 1.7): """ Creates a torus-shaped lens and distorts the portion of the image over which the lens is placed. **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The outer radius of the torus. - `width` a float. The width of the ring. - `refraction` a float. The refraction of the glass. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The outer radius of the torus. + * `width` a float. The width of the ring. + * `refraction` a float. The refraction of the glass. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CITorusLensDistortion', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius=radius, - width=width, - refraction=refraction + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius, + inputWidth=width, + inputRefraction=refraction ) ) self._addFilter(filterDict) @@ -4835,20 +4441,20 @@ def triangleKaleidoscope(self, point: Point = (150.0, 150.0), size: float = 700. **Arguments:** - `point` a tuple (x, y). The x and y position to use as the center of the triangular area in the input image. - `size` a tuple (w, h). The size in pixels of the triangle. - `rotation` a float. Rotation angle in degrees of the triangle. - `decay` a float. The decay determines how fast the color fades from the center triangle. + * `point` a tuple (x, y). The x and y position to use as the center of the triangular area in the input image. + * `size` a tuple (w, h). The size in pixels of the triangle. + * `rotation` a float. Rotation angle in degrees of the triangle. + * `decay` a float. The decay determines how fast the color fades from the center triangle. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CITriangleKaleidoscope', attributes=dict( - point=AppKit.CIVector.vectorWithValues_count_(point, 2), - size=size, - rotation=rotation, - decay=decay + inputPoint=AppKit.CIVector.vectorWithValues_count_(point, 2), + inputSize=size, + inputRotation=radians(rotation), + inputDecay=decay ) ) self._addFilter(filterDict) @@ -4859,18 +4465,18 @@ def triangleTile(self, center: Point = (150.0, 150.0), angle: float = 0.0, width **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `width` a float. The width of a tile. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `width` a float. The width of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CITriangleTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width ) ) self._addFilter(filterDict) @@ -4881,18 +4487,18 @@ def twelvefoldReflectedTile(self, center: Point = (150.0, 150.0), angle: float = **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `angle` a float in degrees. The angle in degrees of the tiled pattern. - `width` a float. The width of a tile. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `angle` a float in degrees. The angle in degrees of the tiled pattern. + * `width` a float. The width of a tile. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CITwelvefoldReflectedTile', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - angle=radians(angle), - width=width + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAngle=radians(angle), + inputWidth=width ) ) self._addFilter(filterDict) @@ -4903,18 +4509,18 @@ def twirlDistortion(self, center: Point = (150.0, 150.0), radius: float = 300.0, **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. - `angle` a float in degrees. The angle in degrees of the twirl. Values can be positive or negative. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. + * `angle` a float in degrees. The angle in degrees of the twirl. Values can be positive or negative. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CITwirlDistortion', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius=radius, - angle=radians(angle) + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius, + inputAngle=radians(angle) ) ) self._addFilter(filterDict) @@ -4925,16 +4531,16 @@ def unsharpMask(self, radius: float = 2.5, intensity: float = 0.5): **Arguments:** - `radius` a float. The radius around a given pixel to apply the unsharp mask. The larger the radius, the more of the image is affected. - `intensity` a float. The intensity of the effect. The larger the value, the more contrast in the affected area. + * `radius` a float. The radius around a given pixel to apply the unsharp mask. The larger the radius, the more of the image is affected. + * `intensity` a float. The intensity of the effect. The larger the value, the more contrast in the affected area. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIUnsharpMask', attributes=dict( - radius=radius, - intensity=intensity + inputRadius=radius, + inputIntensity=intensity ) ) self._addFilter(filterDict) @@ -4945,14 +4551,14 @@ def vibrance(self, amount: float = 0.0): **Arguments:** - `amount` a float. The amount to adjust the saturation. + * `amount` a float. The amount to adjust the saturation. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIVibrance', attributes=dict( - amount=amount + inputAmount=amount ) ) self._addFilter(filterDict) @@ -4963,16 +4569,16 @@ def vignette(self, intensity: float = 0.0, radius: float = 1.0): **Arguments:** - `intensity` a float. The intensity of the effect. - `radius` a float. The distance from the center of the effect. + * `intensity` a float. The intensity of the effect. + * `radius` a float. The distance from the center of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIVignette', attributes=dict( - intensity=intensity, - radius=radius + inputIntensity=intensity, + inputRadius=radius ) ) self._addFilter(filterDict) @@ -4983,20 +4589,20 @@ def vignetteEffect(self, center: Point = (150.0, 150.0), radius: float = 150.0, **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The distance from the center of the effect. - `intensity` a float. The intensity of the effect. - `falloff` a float. The falloff of the effect. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The distance from the center of the effect. + * `intensity` a float. The intensity of the effect. + * `falloff` a float. The falloff of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIVignetteEffect', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - radius=radius, - intensity=intensity, - falloff=falloff + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius, + inputIntensity=intensity, + inputFalloff=falloff ) ) self._addFilter(filterDict) @@ -5007,14 +4613,14 @@ def vividLightBlendMode(self, backgroundImage: Self): **Arguments:** - `backgroundImage` an Image object. The image to use as a background image. + * `backgroundImage` an Image object. The image to use as a background image. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIVividLightBlendMode', attributes=dict( - backgroundImage=backgroundImage + inputBackgroundImage=backgroundImage._ciImage() ) ) self._addFilter(filterDict) @@ -5025,18 +4631,18 @@ def vortexDistortion(self, center: Point = (150.0, 150.0), radius: float = 300.0 **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. - `angle` a float in degrees. The angle in degrees of the effect. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `radius` a float. The radius determines how many pixels are used to create the distortion. The larger the radius, the wider the extent of the distortion. + * `angle` a float in degrees. The angle in degrees of the effect. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIVortexDistortion', attributes=dict( - center=center, - radius=radius, - angle=angle + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputRadius=radius, + inputAngle=angle ) ) self._addFilter(filterDict) @@ -5047,14 +4653,14 @@ def whitePointAdjust(self, color: RGBAColorTuple = (1.0, 1.0, 1.0, 1.0)): **Arguments:** - `color` RGBA tuple Color (r, g, b, a). A color to use as the white point. + * `color` RGBA tuple Color (r, g, b, a). A color to use as the white point. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIWhitePointAdjust', attributes=dict( - color=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) + inputColor=AppKit.CIColor.colorWithRed_green_blue_alpha_(color[0], color[1], color[2], color[3]) ) ) self._addFilter(filterDict) @@ -5076,16 +4682,16 @@ def zoomBlur(self, center: Point = (150.0, 150.0), amount: float = 20.0): **Arguments:** - `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. - `amount` a float. The zoom-in amount. Larger values result in more zooming in. + * `center` a tuple (x, y). The center of the effect as x and y pixel coordinates. + * `amount` a float. The zoom-in amount. Larger values result in more zooming in. """ # the following code is automatically generated with `scripting/imageObjectCodeExtractor.py` # please, do not attempt to edit it manually as it will be overriden in the future filterDict = dict( name='CIZoomBlur', attributes=dict( - center=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), - amount=amount + inputCenter=AppKit.CIVector.vectorWithX_Y_(center[0], center[1]), + inputAmount=amount ) ) self._addFilter(filterDict) diff --git a/scripting/imageObjectCodeExtractor.py b/scripting/imageObjectCodeExtractor.py index d3f87b3e..6d31af1d 100644 --- a/scripting/imageObjectCodeExtractor.py +++ b/scripting/imageObjectCodeExtractor.py @@ -34,6 +34,7 @@ def addDict(self, attribute, data, space=" ", trailing=""): if value: trailing = "" if index == len(data) - 1 else "," self.addDict(key, value, space="", trailing=trailing) + trailing = "" else: comma = "," if index == len(data) - 1: @@ -49,6 +50,7 @@ def appendCode(self, otherCode): def get(self, indentLevel=0): return self.INDENT*indentLevel + f"\n{self.INDENT*indentLevel}".join(self.code) + class UnitTestWriter(CodeWriter): def header(self): @@ -57,8 +59,10 @@ def header(self): self.add("import drawBot") self.add("from testSupport import DrawBotBaseTest") self.newline() + self.add('sourceImagePath = "tests/data/drawBot144.png"') self.add('sampleImage = drawBot.ImageObject("tests/data/drawBot.png")') - self.add('fs = drawBot.FormattedString("Hello World")') + self.add('sampleFormattedString = drawBot.FormattedString("Hello World")') + self.add('sampleText = drawBot.FormattedString("Hello World")') self.newline() self.newline() self.add("class ImageObjectTest(DrawBotBaseTest):") @@ -96,13 +100,17 @@ def camelCase(txt): "rectangle": "AppKit.CIVector.vectorWithValues_count_({inputKey}, 4)", "lightPosition": "AppKit.CIVector.vectorWithValues_count_({inputKey}, 3)", "angle": "radians({inputKey})", + "rotation": "radians({inputKey})", "message": "AppKit.NSData.dataWithBytes_length_({inputKey}, len({inputKey}))", "text": "text.getNSObject()", + "image": "{inputKey}._ciImage()", + ("size", "CIStretchCrop"): "AppKit.CIVector.vectorWithValues_count_({inputKey}, 2)", } variableValues = { "image": "an Image object", "size": "a tuple (w, h)", + ("size", "CIStretchCrop"): "a float", "center": "a tuple (x, y)", "angle": "a float in degrees", "minComponents": "RGBA tuple values for the lower end of the range.", @@ -222,6 +230,14 @@ def getVariableValue(key, fallback=None): key = key[0] return variableValues.get(key, fallback) + +def getConverterValue(key, fallback=None): + if key in converters: + return converters[key] + key = key[0] + return converters.get(key, fallback) + + argumentToHint = {"text": ": FormattedString", "message": ": str"} toCopy = { @@ -240,6 +256,9 @@ def getVariableValue(key, fallback=None): "glassesImage", "hairImage", "matteImage", + "paletteImage", + "guideImage", + "smallImage", ), "message": ("cube0Data", "cube1Data"), "rectangle": ( @@ -257,6 +276,7 @@ def getVariableValue(key, fallback=None): "blueCoefficients", "alphaCoefficients", "biasVector", + "focusRect" ), "color": ( "replacementColor3", @@ -283,6 +303,13 @@ def getVariableValue(key, fallback=None): "topRight", "bottomLeft", "bottomRight", + "breakpoint0", + "breakpoint1", + "growAmount", + "nosePositions", + "leftEyePositions", + "rightEyePositions", + "chinPositions", ), "lightPosition": ("lightPointsAt"), "angle": ("acuteAngle", "crossAngle"), @@ -298,7 +325,7 @@ def getVariableValue(key, fallback=None): ignoreInputKeys = ["inputImage"] -generators = list(AppKit.CIFilter.filterNamesInCategory_("CICategoryGenerator")) +generators = list(AppKit.CIFilter.filterNamesInCategory_("CICategoryGenerator")) generators.extend( [ "CIPDF417BarcodeGenerator", @@ -309,7 +336,7 @@ def getVariableValue(key, fallback=None): ] ) -allFilterNames = AppKit.CIFilter.filterNamesInCategory_(None) +allFilterNames = AppKit.CIFilter.filterNamesInCategory_(None) excludeFilterNames = [ "CIBarcodeGenerator", @@ -318,11 +345,44 @@ def getVariableValue(key, fallback=None): "CIMedianFilter", "CIColorCube", "CIColorCubeWithColorSpace", + "CIHueSaturationValueGradient", # this one requires a colorspace which is difficult to express for regular drawBot users # little use for a filter like this, it does not make sense to abstract this for now # no default value for the colorspace makes it difficult to use it "CIColorCubesMixedWithMask", + "CIColorCurves", "CIAffineTransform", + + # use drawBot to draw text/formattedStrings into an image + "CITextImageGenerator", + "CIAttributedTextImageGenerator", + + # no idea what inputCalibrationData or inputAuxDataMetadata is + "CIDepthBlurEffect", + + # no idea what inputModel should be + "CICoreMLModelFilter", + + # make an issue for a very good reason why DrawBot needs these filters! + "CIConvolution3X3", + "CIConvolution5X5", + "CIConvolution7X7", + "CIConvolution9Horizontal", + "CIConvolution9Vertical", + "CIConvolutionRGB7X7", + "CIConvolutionRGB9Vertical", + "CIConvolutionRGB9Horizontal", + "CIConvolutionRGB5X5", + "CIConvolutionRGB3X3", + "CIAreaAlphaWeightedHistogram", + "CIAreaBoundsRed", + + "CIDistanceGradientFromRedMask", # macos15+ + "CIMaximumScaleTransform", # macos15+ + "CIToneCurve", # macos15+ + "CIToneMapHeadroom" # macos15+ + + ] degreesAngleFilterNames = ["CIVortexDistortion"] @@ -346,19 +406,19 @@ def generateImageObjectCode() -> tuple[str, str]: code = CodeWriter() unitTests = UnitTestWriter() unitTests.header() - + for filterName in allFilterNames: if filterName in excludeFilterNames: continue - ciFilter = AppKit.CIFilter.filterWithName_(filterName) + ciFilter = AppKit.CIFilter.filterWithName_(filterName) ciFilterAttributes = ciFilter.attributes() doc = CodeWriter() - doc.add(AppKit.CIFilter.localizedDescriptionForFilterName_(filterName)) - + doc.add(AppKit.CIFilter.localizedDescriptionForFilterName_(filterName)) + args = [] unitTestsArgs = [] inputCode = CodeWriter() - + inputKeys = [ inputKey for inputKey in ciFilter.inputKeys() @@ -371,9 +431,9 @@ def generateImageObjectCode() -> tuple[str, str]: ciFilterAttributes.get(x, dict()).get("CIAttributeDefault") is not None ) ) - + attributes = dict() - + if inputKeys or filterName == "CIRandomGenerator": doc.newline() doc.add("**Arguments:**") @@ -381,28 +441,29 @@ def generateImageObjectCode() -> tuple[str, str]: if filterName in generators: args.append("size: Size") unitTestsArgs.append("size=(100, 100)") - doc.add(f"`size` {variableValues['size']}") + doc.add(f"* `size` {variableValues['size']}") for inputKey in inputKeys: info = ciFilterAttributes.get(inputKey) default = info.get("CIAttributeDefault") defaultClass = info.get("CIAttributeClass") - + description = info.get("CIAttributeDescription", "") + filterInputKey = inputKey inputKey = camelCase(inputKey[5:]) arg = inputKey - + if inputKey in toCopy["image"]: arg += ": Self" - + if inputKey in argumentToHint: arg += argumentToHint[inputKey] - + # if filterName == "CIAztecCodeGenerator": # print(inputKeys) # print(ciFilterAttributes) - + if default is not None: - if isinstance(default, AppKit.CIVector): + if isinstance(default, AppKit.CIVector): if default.count() == 2: default = default.X(), default.Y() arg += ": Point" @@ -414,22 +475,22 @@ def generateImageObjectCode() -> tuple[str, str]: default.valueAtIndex_(i) for i in range(default.count()) ) arg += ": tuple" - + elif isinstance(default, bool): arg += ": bool" - + elif isinstance(default, (AppKit.NSString, str)): default = f"'{default}'" arg += ": str" - + elif isinstance(default, AppKit.NSNumber): default = float(default) arg += ": float" - - elif isinstance(default, AppKit.NSAffineTransform): + + elif isinstance(default, AppKit.NSAffineTransform): default = tuple(default.transformStruct()) arg += ": TransformTuple" - + elif isinstance(default, AppKit.CIColor): default = ( default.red(), @@ -438,38 +499,37 @@ def generateImageObjectCode() -> tuple[str, str]: default.alpha(), ) arg += ": RGBAColorTuple" - + elif isinstance(default, AppKit.NSData): default = None arg += ": bytes | None" - + elif isinstance(default, type(Quartz.CGColorSpaceCreateDeviceCMYK())): # type: ignore default = None - + else: print(filterName, ciFilterAttributes) raise ValueError(f"We can't parse this default class of `{inputKey}`: {defaultClass}, {default}, {type(default)}") - + arg += f" = {default}" - - if filterName in degreesAngleFilterNames: + + if filterName in degreesAngleFilterNames and inputKey == "angle": value = inputKey else: - value = converters.get(inputKey, inputKey).format(inputKey=inputKey) + value = getConverterValue((inputKey, filterName), inputKey).format(inputKey=inputKey) docValue = getVariableValue((inputKey, filterName), "a float") - attributes[inputKey] = value - - doc.add(f"`{inputKey}` {docValue}. {pythonifyDescription(description)}") + attributes[filterInputKey] = value + + doc.add(f"* `{inputKey}` {docValue}. {pythonifyDescription(description)}") args.append(arg) - - + match inputKey: case inputKey if inputKey.endswith("Image"): value = "sampleImage" case "gainMap" | "texture" | "mask": value = "sampleImage" case "text": - value = "fs" + value = "sampleFormattedString" case "message": value = "b'Hello World'" case "topLeft" | "topRight" | "bottomRight" | "bottomLeft": @@ -477,7 +537,7 @@ def generateImageObjectCode() -> tuple[str, str]: case _: value = default unitTestsArgs.append(f"{inputKey}={value}") - + drawBotFilterName = camelCase(filterName[2:]) code.add( f"def {drawBotFilterName}" @@ -496,28 +556,29 @@ def generateImageObjectCode() -> tuple[str, str]: filterDict["isGenerator"] = "True" if filterName.endswith("CodeGenerator"): filterDict["fitImage"] = "True" - + code.addDict("filterDict", filterDict) - + code.add("self._addFilter(filterDict)") code.dedent() code.newline() - + unitTests.add(f"def test_{drawBotFilterName}(self):") unitTests.indent() - unitTests.add("img = drawBot.ImageObject()") + unitTests.add("img = drawBot.ImageObject(sourceImagePath)") unitTests.add(f"img.{drawBotFilterName}({', '.join(unitTestsArgs)})") + unitTests.add("img._applyFilters()") unitTests.newline() unitTests.dedent() - + imageObjectText = IMAGE_OBJECT_PATH.read_text() - + beforeFilters = [] for eachLine in imageObjectText.splitlines(): beforeFilters.append(eachLine) if eachLine == " # --- filters ---": break - + imageObjectCode = "\n".join(beforeFilters) + "\n" + code.get(indentLevel=1).replace("“", '"').replace("”", '"') unitTests.footer() unitTestsCode = unitTests.get() diff --git a/tests/testImageObject.py b/tests/testImageObject.py index 9e317351..2cd8d6f3 100644 --- a/tests/testImageObject.py +++ b/tests/testImageObject.py @@ -3,927 +3,1073 @@ import drawBot from testSupport import DrawBotBaseTest +sourceImagePath = "tests/data/drawBot144.png" sampleImage = drawBot.ImageObject("tests/data/drawBot.png") -fs = drawBot.FormattedString("Hello World") +sampleFormattedString = drawBot.FormattedString("Hello World") +sampleText = drawBot.FormattedString("Hello World") class ImageObjectTest(DrawBotBaseTest): def test_accordionFoldTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.accordionFoldTransition(targetImage=sampleImage, bottomHeight=0.0, numberOfFolds=3.0, foldShadowAmount=0.1, time=0.0) + img._applyFilters() def test_additionCompositing(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.additionCompositing(backgroundImage=sampleImage) + img._applyFilters() def test_affineClamp(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.affineClamp(transform=(0.4, 0.0, 0.0, 0.4, 0.0, 0.0)) + img._applyFilters() def test_affineTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.affineTile(transform=(0.4, 0.0, 0.0, 0.4, 0.0, 0.0)) + img._applyFilters() def test_areaAverage(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.areaAverage(extent=(0.0, 0.0, 640.0, 80.0)) + img._applyFilters() def test_areaHistogram(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.areaHistogram(extent=(0.0, 0.0, 640.0, 80.0), scale=1.0, count=64.0) + img._applyFilters() def test_areaLogarithmicHistogram(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.areaLogarithmicHistogram(extent=(0.0, 0.0, 640.0, 80.0), scale=1.0, count=64.0, minimumStop=-10.0, maximumStop=4.0) + img._applyFilters() def test_areaMaximum(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.areaMaximum(extent=(0.0, 0.0, 640.0, 80.0)) + img._applyFilters() def test_areaMaximumAlpha(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.areaMaximumAlpha(extent=(0.0, 0.0, 640.0, 80.0)) + img._applyFilters() def test_areaMinimum(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.areaMinimum(extent=(0.0, 0.0, 640.0, 80.0)) + img._applyFilters() def test_areaMinimumAlpha(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.areaMinimumAlpha(extent=(0.0, 0.0, 640.0, 80.0)) + img._applyFilters() def test_areaMinMax(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.areaMinMax(extent=(0.0, 0.0, 640.0, 80.0)) + img._applyFilters() def test_areaMinMaxRed(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.areaMinMaxRed(extent=(0.0, 0.0, 640.0, 80.0)) - - def test_attributedTextImageGenerator(self): - img = drawBot.ImageObject() - img.attributedTextImageGenerator(size=(100, 100), text=fs, scaleFactor=1.0, padding=0.0) + img._applyFilters() def test_aztecCodeGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.aztecCodeGenerator(size=(100, 100), message=b'Hello World', layers=None, compactStyle=None, correctionLevel=23.0) + img._applyFilters() def test_barsSwipeTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.barsSwipeTransition(targetImage=sampleImage, angle=3.141592653589793, width=30.0, barOffset=10.0, time=0.0) + img._applyFilters() def test_blendWithAlphaMask(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.blendWithAlphaMask(backgroundImage=sampleImage, maskImage=sampleImage) + img._applyFilters() def test_blendWithBlueMask(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.blendWithBlueMask(backgroundImage=sampleImage, maskImage=sampleImage) + img._applyFilters() def test_blendWithMask(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.blendWithMask(backgroundImage=sampleImage, maskImage=sampleImage) + img._applyFilters() def test_blendWithRedMask(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.blendWithRedMask(backgroundImage=sampleImage, maskImage=sampleImage) + img._applyFilters() def test_bloom(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.bloom(radius=10.0, intensity=0.5) + img._applyFilters() def test_blurredRectangleGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.blurredRectangleGenerator(size=(100, 100), extent=(0.0, 0.0, 100.0, 100.0), sigma=10.0, color=(1.0, 1.0, 1.0, 1.0)) + img._applyFilters() def test_bokehBlur(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.bokehBlur(radius=20.0, ringAmount=0.0, ringSize=0.1, softness=1.0) + img._applyFilters() def test_boxBlur(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.boxBlur(radius=10.0) + img._applyFilters() def test_bumpDistortion(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.bumpDistortion(center=(150.0, 150.0), radius=300.0, scale=0.5) + img._applyFilters() def test_bumpDistortionLinear(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.bumpDistortionLinear(center=(150.0, 150.0), radius=300.0, angle=0.0, scale=0.5) + img._applyFilters() def test_cannyEdgeDetector(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.cannyEdgeDetector(gaussianSigma=1.6, perceptual=False, thresholdHigh=0.05, thresholdLow=0.02, hysteresisPasses=1.0) + img._applyFilters() def test_checkerboardGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.checkerboardGenerator(size=(100, 100), center=(150.0, 150.0), color0=(1.0, 1.0, 1.0, 1.0), color1=(0.0, 0.0, 0.0, 1.0), width=80.0, sharpness=1.0) + img._applyFilters() def test_circleSplashDistortion(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.circleSplashDistortion(center=(150.0, 150.0), radius=150.0) + img._applyFilters() def test_circularScreen(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.circularScreen(center=(150.0, 150.0), width=6.0, sharpness=0.7) + img._applyFilters() def test_circularWrap(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.circularWrap(center=(150.0, 150.0), radius=150.0, angle=0.0) + img._applyFilters() def test_clamp(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.clamp(extent=(0.0, 0.0, 640.0, 80.0)) + img._applyFilters() def test_CMYKHalftone(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.CMYKHalftone(center=(150.0, 150.0), width=6.0, angle=0.0, sharpness=0.7, GCR=1.0, UCR=0.5) + img._applyFilters() def test_code128BarcodeGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.code128BarcodeGenerator(size=(100, 100), message=b'Hello World', quietSpace=10.0, barcodeHeight=32.0) + img._applyFilters() def test_colorAbsoluteDifference(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorAbsoluteDifference(image2=None) + img._applyFilters() def test_colorBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_colorBurnBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorBurnBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_colorClamp(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorClamp(minComponents=(0.0, 0.0, 0.0, 0.0), maxComponents=(1.0, 1.0, 1.0, 1.0)) + img._applyFilters() def test_colorControls(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorControls(saturation=1.0, brightness=0.0, contrast=1.0) + img._applyFilters() def test_colorCrossPolynomial(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorCrossPolynomial(redCoefficients=(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), greenCoefficients=(0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), blueCoefficients=(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)) - - def test_colorCurves(self): - img = drawBot.ImageObject() - img.colorCurves(colorSpace=None, curvesData=None, curvesDomain=(0.0, 1.0)) + img._applyFilters() def test_colorDodgeBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorDodgeBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_colorInvert(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorInvert() + img._applyFilters() def test_colorMap(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorMap(gradientImage=sampleImage) + img._applyFilters() def test_colorMatrix(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorMatrix(RVector=(1.0, 0.0, 0.0, 0.0), GVector=(0.0, 1.0, 0.0, 0.0), BVector=(0.0, 0.0, 1.0, 0.0), AVector=(0.0, 0.0, 0.0, 1.0), biasVector=(0.0, 0.0, 0.0, 0.0)) + img._applyFilters() def test_colorMonochrome(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorMonochrome(color=(0.6, 0.45, 0.3, 1.0), intensity=1.0) + img._applyFilters() def test_colorPolynomial(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorPolynomial(redCoefficients=(0.0, 1.0, 0.0, 0.0), greenCoefficients=(0.0, 1.0, 0.0, 0.0), blueCoefficients=(0.0, 1.0, 0.0, 0.0), alphaCoefficients=(0.0, 1.0, 0.0, 0.0)) + img._applyFilters() def test_colorPosterize(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorPosterize(levels=6.0) + img._applyFilters() def test_colorThreshold(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorThreshold(threshold=0.5) + img._applyFilters() def test_colorThresholdOtsu(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.colorThresholdOtsu() + img._applyFilters() def test_columnAverage(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.columnAverage(extent=(0.0, 0.0, 640.0, 80.0)) + img._applyFilters() def test_comicEffect(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.comicEffect() + img._applyFilters() def test_constantColorGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.constantColorGenerator(size=(100, 100), color=(1.0, 0.0, 0.0, 1.0)) + img._applyFilters() def test_convertLabToRGB(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.convertLabToRGB(normalize=False) + img._applyFilters() def test_convertRGBtoLab(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.convertRGBtoLab(normalize=False) - - def test_convolution3X3(self): - img = drawBot.ImageObject() - img.convolution3X3(weights=(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) - - def test_convolution5X5(self): - img = drawBot.ImageObject() - img.convolution5X5(weights=(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) - - def test_convolution7X7(self): - img = drawBot.ImageObject() - img.convolution7X7(weights=(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) - - def test_convolution9Horizontal(self): - img = drawBot.ImageObject() - img.convolution9Horizontal(weights=(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) - - def test_convolution9Vertical(self): - img = drawBot.ImageObject() - img.convolution9Vertical(weights=(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) - - def test_convolutionRGB3X3(self): - img = drawBot.ImageObject() - img.convolutionRGB3X3(weights=(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) - - def test_convolutionRGB5X5(self): - img = drawBot.ImageObject() - img.convolutionRGB5X5(weights=(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) - - def test_convolutionRGB7X7(self): - img = drawBot.ImageObject() - img.convolutionRGB7X7(weights=(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) - - def test_convolutionRGB9Horizontal(self): - img = drawBot.ImageObject() - img.convolutionRGB9Horizontal(weights=(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) - - def test_convolutionRGB9Vertical(self): - img = drawBot.ImageObject() - img.convolutionRGB9Vertical(weights=(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0), bias=0.0) + img._applyFilters() def test_copyMachineTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.copyMachineTransition(targetImage=sampleImage, extent=(0.0, 0.0, 300.0, 300.0), color=(0.6, 1.0, 0.8, 1.0), time=0.0, angle=0.0, width=200.0, opacity=1.3) - - def test_coreMLModelFilter(self): - img = drawBot.ImageObject() - img.coreMLModelFilter(model=None, headIndex=0.0, softmaxNormalization=False) + img._applyFilters() def test_crop(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.crop(rectangle=(-8.988465674311579e+307, -8.988465674311579e+307, 1.7976931348623157e+308, 1.7976931348623157e+308)) + img._applyFilters() def test_crystallize(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.crystallize(radius=20.0, center=(150.0, 150.0)) + img._applyFilters() def test_darkenBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.darkenBlendMode(backgroundImage=sampleImage) - - def test_depthBlurEffect(self): - img = drawBot.ImageObject() - img.depthBlurEffect(disparityImage=sampleImage, matteImage=sampleImage, hairImage=sampleImage, glassesImage=sampleImage, gainMap=sampleImage, focusRect=None, calibrationData=None, auxDataMetadata=None, shape=None, aperture=0.0, leftEyePositions=(-1.0, -1.0), rightEyePositions=(-1.0, -1.0), chinPositions=(-1.0, -1.0), nosePositions=(-1.0, -1.0), lumaNoiseScale=0.0, scaleFactor=1.0) + img._applyFilters() def test_depthOfField(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.depthOfField(point0=(0.0, 300.0), point1=(300.0, 300.0), saturation=1.5, unsharpMaskRadius=2.5, unsharpMaskIntensity=0.5, radius=6.0) + img._applyFilters() def test_depthToDisparity(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.depthToDisparity() + img._applyFilters() def test_differenceBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.differenceBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_discBlur(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.discBlur(radius=8.0) + img._applyFilters() def test_disintegrateWithMaskTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.disintegrateWithMaskTransition(targetImage=sampleImage, maskImage=sampleImage, time=0.0, shadowRadius=8.0, shadowDensity=0.65, shadowOffset=(0.0, -10.0)) + img._applyFilters() def test_disparityToDepth(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.disparityToDepth() + img._applyFilters() def test_displacementDistortion(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.displacementDistortion(displacementImage=sampleImage, scale=50.0) + img._applyFilters() def test_dissolveTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.dissolveTransition(targetImage=sampleImage, time=0.0) + img._applyFilters() def test_dither(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.dither(intensity=0.1) + img._applyFilters() def test_divideBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.divideBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_documentEnhancer(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.documentEnhancer(amount=1.0) + img._applyFilters() def test_dotScreen(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.dotScreen(center=(150.0, 150.0), angle=0.0, width=6.0, sharpness=0.7) + img._applyFilters() def test_droste(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.droste(insetPoint0=(200.0, 200.0), insetPoint1=(400.0, 400.0), strands=1.0, periodicity=1.0, rotation=0.0, zoom=1.0) + img._applyFilters() def test_edgePreserveUpsampleFilter(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.edgePreserveUpsampleFilter(smallImage=sampleImage, spatialSigma=3.0, lumaSigma=0.15) + img._applyFilters() def test_edges(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.edges(intensity=1.0) + img._applyFilters() def test_edgeWork(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.edgeWork(radius=3.0) + img._applyFilters() def test_eightfoldReflectedTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.eightfoldReflectedTile(center=(150.0, 150.0), angle=0.0, width=100.0) + img._applyFilters() def test_exclusionBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.exclusionBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_exposureAdjust(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.exposureAdjust(EV=0.0) + img._applyFilters() def test_falseColor(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.falseColor(color0=(0.3, 0.0, 0.0, 1.0), color1=(1.0, 0.9, 0.8, 1.0)) + img._applyFilters() def test_flashTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.flashTransition(targetImage=sampleImage, center=(150.0, 150.0), extent=(0.0, 0.0, 300.0, 300.0), color=(1.0, 0.8, 0.6, 1.0), time=0.0, maxStriationRadius=2.58, striationStrength=0.5, striationContrast=1.375, fadeThreshold=0.85) + img._applyFilters() def test_fourfoldReflectedTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.fourfoldReflectedTile(center=(150.0, 150.0), angle=0.0, width=100.0, acuteAngle=1.5707963267948966) + img._applyFilters() def test_fourfoldRotatedTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.fourfoldRotatedTile(center=(150.0, 150.0), angle=0.0, width=100.0) + img._applyFilters() def test_fourfoldTranslatedTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.fourfoldTranslatedTile(center=(150.0, 150.0), angle=0.0, width=100.0, acuteAngle=1.5707963267948966) + img._applyFilters() def test_gaborGradients(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.gaborGradients() + img._applyFilters() def test_gammaAdjust(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.gammaAdjust(power=1.0) + img._applyFilters() def test_gaussianBlur(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.gaussianBlur(radius=10.0) + img._applyFilters() def test_gaussianGradient(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.gaussianGradient(size=(100, 100), center=(150.0, 150.0), color0=(1.0, 1.0, 1.0, 1.0), color1=(0.0, 0.0, 0.0, 0.0), radius=300.0) + img._applyFilters() def test_glassDistortion(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.glassDistortion(texture=sampleImage, center=(150.0, 150.0), scale=200.0) + img._applyFilters() def test_glassLozenge(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.glassLozenge(point0=(150.0, 150.0), point1=(350.0, 150.0), radius=100.0, refraction=1.7) + img._applyFilters() def test_glideReflectedTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.glideReflectedTile(center=(150.0, 150.0), angle=0.0, width=100.0) + img._applyFilters() def test_gloom(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.gloom(radius=10.0, intensity=0.5) + img._applyFilters() def test_guidedFilter(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.guidedFilter(guideImage=sampleImage, radius=1.0, epsilon=0.0001) + img._applyFilters() def test_hardLightBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.hardLightBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_hatchedScreen(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.hatchedScreen(center=(150.0, 150.0), angle=0.0, width=6.0, sharpness=0.7) + img._applyFilters() def test_heightFieldFromMask(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.heightFieldFromMask(radius=10.0) + img._applyFilters() def test_hexagonalPixellate(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.hexagonalPixellate(center=(150.0, 150.0), scale=8.0) + img._applyFilters() def test_highlightShadowAdjust(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.highlightShadowAdjust(radius=0.0, shadowAmount=0.0, highlightAmount=1.0) + img._applyFilters() def test_histogramDisplayFilter(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.histogramDisplayFilter(height=100.0, highLimit=1.0, lowLimit=0.0) + img._applyFilters() def test_holeDistortion(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.holeDistortion(center=(150.0, 150.0), radius=150.0) + img._applyFilters() def test_hueAdjust(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.hueAdjust(angle=0.0) + img._applyFilters() def test_hueBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.hueBlendMode(backgroundImage=sampleImage) - - def test_hueSaturationValueGradient(self): - img = drawBot.ImageObject() - img.hueSaturationValueGradient(value=1.0, radius=300.0, softness=1.0, dither=1.0, colorSpace=None) + img._applyFilters() def test_kaleidoscope(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.kaleidoscope(count=6.0, center=(150.0, 150.0), angle=0.0) + img._applyFilters() def test_keystoneCorrectionCombined(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.keystoneCorrectionCombined(topLeft=(2, 2), topRight=(2, 2), bottomRight=(2, 2), bottomLeft=(2, 2), focalLength=28.0) + img._applyFilters() def test_keystoneCorrectionHorizontal(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.keystoneCorrectionHorizontal(topLeft=(2, 2), topRight=(2, 2), bottomRight=(2, 2), bottomLeft=(2, 2), focalLength=28.0) + img._applyFilters() def test_keystoneCorrectionVertical(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.keystoneCorrectionVertical(topLeft=(2, 2), topRight=(2, 2), bottomRight=(2, 2), bottomLeft=(2, 2), focalLength=28.0) + img._applyFilters() def test_KMeans(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.KMeans(means=None, extent=(0.0, 0.0, 640.0, 80.0), count=8.0, passes=5.0, perceptual=False) + img._applyFilters() def test_labDeltaE(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.labDeltaE(image2=None) + img._applyFilters() def test_lanczosScaleTransform(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.lanczosScaleTransform(scale=1.0, aspectRatio=1.0) + img._applyFilters() def test_lenticularHaloGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.lenticularHaloGenerator(size=(100, 100), center=(150.0, 150.0), color=(1.0, 0.9, 0.8, 1.0), haloRadius=70.0, haloWidth=87.0, haloOverlap=0.77, striationStrength=0.5, striationContrast=1.0, time=0.0) + img._applyFilters() def test_lightenBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.lightenBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_lightTunnel(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.lightTunnel(center=(150.0, 150.0), rotation=0.0, radius=100.0) + img._applyFilters() def test_linearBurnBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.linearBurnBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_linearDodgeBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.linearDodgeBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_linearGradient(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.linearGradient(size=(100, 100), point0=(0.0, 0.0), point1=(200.0, 200.0), color0=(1.0, 1.0, 1.0, 1.0), color1=(0.0, 0.0, 0.0, 1.0)) + img._applyFilters() def test_linearLightBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.linearLightBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_linearToSRGBToneCurve(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.linearToSRGBToneCurve() + img._applyFilters() def test_lineOverlay(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.lineOverlay(NRNoiseLevel=0.07, NRSharpness=0.71, edgeIntensity=1.0, threshold=0.1, contrast=50.0) + img._applyFilters() def test_lineScreen(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.lineScreen(center=(150.0, 150.0), angle=0.0, width=6.0, sharpness=0.7) + img._applyFilters() def test_luminosityBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.luminosityBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_maskedVariableBlur(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.maskedVariableBlur(mask=sampleImage, radius=5.0) + img._applyFilters() def test_maskToAlpha(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.maskToAlpha() + img._applyFilters() def test_maximumComponent(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.maximumComponent() + img._applyFilters() def test_maximumCompositing(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.maximumCompositing(backgroundImage=sampleImage) + img._applyFilters() def test_meshGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.meshGenerator(size=(100, 100), mesh=None, width=1.5, color=(1.0, 1.0, 1.0, 1.0)) + img._applyFilters() def test_minimumComponent(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.minimumComponent() + img._applyFilters() def test_minimumCompositing(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.minimumCompositing(backgroundImage=sampleImage) + img._applyFilters() def test_mix(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.mix(backgroundImage=sampleImage, amount=1.0) + img._applyFilters() def test_modTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.modTransition(targetImage=sampleImage, center=(150.0, 150.0), time=0.0, angle=2.0, radius=150.0, compression=300.0) + img._applyFilters() def test_morphologyGradient(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.morphologyGradient(radius=5.0) + img._applyFilters() def test_morphologyMaximum(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.morphologyMaximum(radius=0.0) + img._applyFilters() def test_morphologyMinimum(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.morphologyMinimum(radius=0.0) + img._applyFilters() def test_morphologyRectangleMaximum(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.morphologyRectangleMaximum(width=5.0, height=5.0) + img._applyFilters() def test_morphologyRectangleMinimum(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.morphologyRectangleMinimum(width=5.0, height=5.0) + img._applyFilters() def test_motionBlur(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.motionBlur(radius=20.0, angle=0.0) + img._applyFilters() def test_multiplyBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.multiplyBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_multiplyCompositing(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.multiplyCompositing(backgroundImage=sampleImage) + img._applyFilters() def test_ninePartStretched(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.ninePartStretched(breakpoint0=(50.0, 50.0), breakpoint1=(150.0, 150.0), growAmount=(100.0, 100.0)) + img._applyFilters() def test_ninePartTiled(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.ninePartTiled(breakpoint0=(50.0, 50.0), breakpoint1=(150.0, 150.0), growAmount=(100.0, 100.0), flipYTiles=True) + img._applyFilters() def test_noiseReduction(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.noiseReduction(noiseLevel=0.02, sharpness=0.4) + img._applyFilters() def test_opTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.opTile(center=(150.0, 150.0), scale=2.8, angle=0.0, width=65.0) + img._applyFilters() def test_overlayBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.overlayBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_pageCurlTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.pageCurlTransition(targetImage=sampleImage, backsideImage=sampleImage, shadingImage=sampleImage, extent=(0.0, 0.0, 300.0, 300.0), time=0.0, angle=0.0, radius=100.0) + img._applyFilters() def test_pageCurlWithShadowTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.pageCurlWithShadowTransition(targetImage=sampleImage, backsideImage=sampleImage, extent=(0.0, 0.0, 0.0, 0.0), time=0.0, angle=0.0, radius=100.0, shadowSize=0.5, shadowAmount=0.7, shadowExtent=(0.0, 0.0, 0.0, 0.0)) + img._applyFilters() def test_paletteCentroid(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.paletteCentroid(paletteImage=sampleImage, perceptual=False) + img._applyFilters() def test_palettize(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.palettize(paletteImage=sampleImage, perceptual=False) + img._applyFilters() def test_parallelogramTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.parallelogramTile(center=(150.0, 150.0), angle=0.0, acuteAngle=1.5707963267948966, width=100.0) + img._applyFilters() def test_PDF417BarcodeGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.PDF417BarcodeGenerator(size=(100, 100), message=b'Hello World', minWidth=None, maxWidth=None, minHeight=None, maxHeight=None, dataColumns=None, rows=None, preferredAspectRatio=None, compactionMode=None, compactStyle=None, correctionLevel=None, alwaysSpecifyCompaction=None) + img._applyFilters() def test_personSegmentation(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.personSegmentation(qualityLevel=0.0) + img._applyFilters() def test_perspectiveCorrection(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.perspectiveCorrection(topLeft=(2, 2), topRight=(2, 2), bottomRight=(2, 2), bottomLeft=(2, 2), crop=True) + img._applyFilters() def test_perspectiveRotate(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.perspectiveRotate(focalLength=28.0, pitch=0.0, yaw=0.0, roll=0.0) + img._applyFilters() def test_perspectiveTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.perspectiveTile(topLeft=(2, 2), topRight=(2, 2), bottomRight=(2, 2), bottomLeft=(2, 2)) + img._applyFilters() def test_perspectiveTransform(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.perspectiveTransform(topLeft=(2, 2), topRight=(2, 2), bottomRight=(2, 2), bottomLeft=(2, 2)) + img._applyFilters() def test_perspectiveTransformWithExtent(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.perspectiveTransformWithExtent(extent=(0.0, 0.0, 300.0, 300.0), topLeft=(2, 2), topRight=(2, 2), bottomRight=(2, 2), bottomLeft=(2, 2)) + img._applyFilters() def test_photoEffectChrome(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.photoEffectChrome(extrapolate=False) + img._applyFilters() def test_photoEffectFade(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.photoEffectFade(extrapolate=False) + img._applyFilters() def test_photoEffectInstant(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.photoEffectInstant(extrapolate=False) + img._applyFilters() def test_photoEffectMono(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.photoEffectMono(extrapolate=False) + img._applyFilters() def test_photoEffectNoir(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.photoEffectNoir(extrapolate=False) + img._applyFilters() def test_photoEffectProcess(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.photoEffectProcess(extrapolate=False) + img._applyFilters() def test_photoEffectTonal(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.photoEffectTonal(extrapolate=False) + img._applyFilters() def test_photoEffectTransfer(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.photoEffectTransfer(extrapolate=False) + img._applyFilters() def test_pinchDistortion(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.pinchDistortion(center=(150.0, 150.0), radius=300.0, scale=0.5) + img._applyFilters() def test_pinLightBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.pinLightBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_pixellate(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.pixellate(center=(150.0, 150.0), scale=8.0) + img._applyFilters() def test_pointillize(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.pointillize(radius=20.0, center=(150.0, 150.0)) + img._applyFilters() def test_QRCodeGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.QRCodeGenerator(size=(100, 100), message=b'Hello World', correctionLevel='M') + img._applyFilters() def test_radialGradient(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.radialGradient(size=(100, 100), center=(150.0, 150.0), radius0=5.0, radius1=100.0, color0=(1.0, 1.0, 1.0, 1.0), color1=(0.0, 0.0, 0.0, 1.0)) + img._applyFilters() def test_randomGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.randomGenerator(size=(100, 100)) + img._applyFilters() def test_rippleTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.rippleTransition(targetImage=sampleImage, shadingImage=sampleImage, center=(150.0, 150.0), extent=(0.0, 0.0, 300.0, 300.0), time=0.0, width=100.0, scale=50.0) + img._applyFilters() def test_roundedRectangleGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.roundedRectangleGenerator(size=(100, 100), extent=(0.0, 0.0, 100.0, 100.0), radius=10.0, color=(1.0, 1.0, 1.0, 1.0)) + img._applyFilters() def test_roundedRectangleStrokeGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.roundedRectangleStrokeGenerator(size=(100, 100), extent=(0.0, 0.0, 100.0, 100.0), radius=10.0, color=(1.0, 1.0, 1.0, 1.0), width=10.0) + img._applyFilters() def test_rowAverage(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.rowAverage(extent=(0.0, 0.0, 640.0, 80.0)) + img._applyFilters() def test_saliencyMapFilter(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.saliencyMapFilter() + img._applyFilters() def test_sampleNearest(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sampleNearest() + img._applyFilters() def test_saturationBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.saturationBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_screenBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.screenBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_sepiaTone(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sepiaTone(intensity=1.0) + img._applyFilters() def test_shadedMaterial(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.shadedMaterial(shadingImage=sampleImage, scale=10.0) + img._applyFilters() def test_sharpenLuminance(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sharpenLuminance(sharpness=0.4, radius=1.69) + img._applyFilters() def test_sixfoldReflectedTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sixfoldReflectedTile(center=(150.0, 150.0), angle=0.0, width=100.0) + img._applyFilters() def test_sixfoldRotatedTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sixfoldRotatedTile(center=(150.0, 150.0), angle=0.0, width=100.0) + img._applyFilters() def test_smoothLinearGradient(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.smoothLinearGradient(size=(100, 100), point0=(0.0, 0.0), point1=(200.0, 200.0), color0=(1.0, 1.0, 1.0, 1.0), color1=(0.0, 0.0, 0.0, 1.0)) + img._applyFilters() def test_sobelGradients(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sobelGradients() + img._applyFilters() def test_softLightBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.softLightBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_sourceAtopCompositing(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sourceAtopCompositing(backgroundImage=sampleImage) + img._applyFilters() def test_sourceInCompositing(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sourceInCompositing(backgroundImage=sampleImage) + img._applyFilters() def test_sourceOutCompositing(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sourceOutCompositing(backgroundImage=sampleImage) + img._applyFilters() def test_sourceOverCompositing(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sourceOverCompositing(backgroundImage=sampleImage) + img._applyFilters() def test_spotColor(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.spotColor(centerColor1=(0.0784, 0.0627, 0.0706, 1.0), replacementColor1=(0.4392, 0.1922, 0.1961, 1.0), closeness1=0.22, contrast1=0.98, centerColor2=(0.5255, 0.3059, 0.3451, 1.0), replacementColor2=(0.9137, 0.5608, 0.5059, 1.0), closeness2=0.15, contrast2=0.98, centerColor3=(0.9216, 0.4549, 0.3333, 1.0), replacementColor3=(0.9098, 0.7529, 0.6078, 1.0), closeness3=0.5, contrast3=0.99) + img._applyFilters() def test_spotLight(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.spotLight(lightPosition=(400.0, 600.0, 150.0), lightPointsAt=(200.0, 200.0, 0.0), brightness=3.0, concentration=0.1, color=(1.0, 1.0, 1.0, 1.0)) + img._applyFilters() def test_SRGBToneCurveToLinear(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.SRGBToneCurveToLinear() + img._applyFilters() def test_starShineGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.starShineGenerator(size=(100, 100), center=(150.0, 150.0), color=(1.0, 0.8, 0.6, 1.0), radius=50.0, crossScale=15.0, crossAngle=0.6, crossOpacity=-2.0, crossWidth=2.5, epsilon=-2.0) + img._applyFilters() def test_straightenFilter(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.straightenFilter(angle=0.0) + img._applyFilters() def test_stretchCrop(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.stretchCrop(size=(1280.0, 720.0), cropAmount=0.25, centerStretchAmount=0.25) + img._applyFilters() def test_stripesGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.stripesGenerator(size=(100, 100), center=(150.0, 150.0), color0=(1.0, 1.0, 1.0, 1.0), color1=(0.0, 0.0, 0.0, 1.0), width=80.0, sharpness=1.0) + img._applyFilters() def test_subtractBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.subtractBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_sunbeamsGenerator(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.sunbeamsGenerator(size=(100, 100), center=(150.0, 150.0), color=(1.0, 0.5, 0.0, 1.0), sunRadius=40.0, maxStriationRadius=2.58, striationStrength=0.5, striationContrast=1.375, time=0.0) + img._applyFilters() def test_swipeTransition(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.swipeTransition(targetImage=sampleImage, extent=(0.0, 0.0, 300.0, 300.0), color=(1.0, 1.0, 1.0, 1.0), time=0.0, angle=0.0, width=300.0, opacity=0.0) + img._applyFilters() def test_temperatureAndTint(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.temperatureAndTint(neutral=(6500.0, 0.0), targetNeutral=(6500.0, 0.0)) - - def test_textImageGenerator(self): - img = drawBot.ImageObject() - img.textImageGenerator(size=(100, 100), text=fs, fontName='HelveticaNeue', fontSize=12.0, scaleFactor=1.0, padding=0.0) + img._applyFilters() def test_thermal(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.thermal() - - def test_toneCurve(self): - img = drawBot.ImageObject() - img.toneCurve(point0=(0.0, 0.0), point1=(0.25, 0.25), point2=(0.5, 0.5), point3=(0.75, 0.75), point4=(1.0, 1.0)) + img._applyFilters() def test_torusLensDistortion(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.torusLensDistortion(center=(150.0, 150.0), radius=160.0, width=80.0, refraction=1.7) + img._applyFilters() def test_triangleKaleidoscope(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.triangleKaleidoscope(point=(150.0, 150.0), size=700.0, rotation=5.924285296593801, decay=0.85) + img._applyFilters() def test_triangleTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.triangleTile(center=(150.0, 150.0), angle=0.0, width=100.0) + img._applyFilters() def test_twelvefoldReflectedTile(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.twelvefoldReflectedTile(center=(150.0, 150.0), angle=0.0, width=100.0) + img._applyFilters() def test_twirlDistortion(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.twirlDistortion(center=(150.0, 150.0), radius=300.0, angle=3.141592653589793) + img._applyFilters() def test_unsharpMask(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.unsharpMask(radius=2.5, intensity=0.5) + img._applyFilters() def test_vibrance(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.vibrance(amount=0.0) + img._applyFilters() def test_vignette(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.vignette(intensity=0.0, radius=1.0) + img._applyFilters() def test_vignetteEffect(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.vignetteEffect(center=(150.0, 150.0), radius=150.0, intensity=1.0, falloff=0.5) + img._applyFilters() def test_vividLightBlendMode(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.vividLightBlendMode(backgroundImage=sampleImage) + img._applyFilters() def test_vortexDistortion(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.vortexDistortion(center=(150.0, 150.0), radius=300.0, angle=56.548667764616276) + img._applyFilters() def test_whitePointAdjust(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.whitePointAdjust(color=(1.0, 1.0, 1.0, 1.0)) + img._applyFilters() def test_XRay(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.XRay() + img._applyFilters() def test_zoomBlur(self): - img = drawBot.ImageObject() + img = drawBot.ImageObject(sourceImagePath) img.zoomBlur(center=(150.0, 150.0), amount=20.0) + img._applyFilters() if __name__ == '__main__': sys.exit(unittest.main())