ImageAPI
¶
-
class
ImageAPI
¶ ImageAPI
is used to access an Image Item in a Scribus document. It inherits the attributes and methods ofItemAPI
, along with the following Attributes and Methods.
ImageAPI
Attributes¶
-
ImageAPI.
xScale
¶ Used to read/write the Image Scale along X Axis.
>>> print imageItem.xScale #reading the xScale 1.0 >>> imageItem.xScale = 0.5 #setting the value of xScale >>>
-
ImageAPI.
yScale
¶ Used to read/write the Image Scale along Y Axis.
>>> print imageItem.yScale #reading the yScale 1.0 >>> imageItem.yScale = 2.0 #setting the value of yScale >>>
-
ImageAPI.
xOffset
¶ Used to read/write the Image Offset along X Axis.
>>> print imageItem.xOffset #reading the xOffset 0.0 >>> imageItem.xOffset = 2.0 #setting the value of xOffset >>>
-
ImageAPI.
yOffset
¶ Used to read/write the Image Offset along Y Axis.
>>> print imageItem.yOffset #reading the yOffset 0.0 >>> imageItem.yOffset = 2.0 #setting the value of yOffset >>>
ImageAPI
Methods¶
-
ImageAPI.
load
(filename)¶ Load an image into the Image Frame.
Parameters: filename – name of the image file to be loaded into the image frame. >>> imageItem.load("/Users/scribus/logo.jpg") >>>
-
ImageAPI.
scale
(x, y)¶ Set the scaling of loaded image.
Parameters: - x – Set the scaling along X Axis.
- y – Set the scaling along Y Axis.
-
ImageAPI.
offset
(x, y)¶ Set the offsets of loaded image.
Parameters: - x – Set the offset along X Axis.
- y – Set the offset along Y Axis.
-
ImageAPI.
setBrightness
(amount)¶ Set the brightness of the loaded image.
>>> imageItem.setBrightness(100) >>>
-
ImageAPI.
setGrayscale
()¶ Set the loaded image to Grayscale.
>>> imageItem.setGrayscale() >>>
-
ImageAPI.
scaleToFrame
(scale, proportional)¶ Scale the loaded image to image frame.
Parameters: - scale – Set True for scaleToFrame.
- proportional – Set True for scaling proportionally.
>>> imageItem.scaleToFrame(True, True) >>>