Skip to content

RasterItem

app.activeDocument.rasterItems[index]

A bitmap art item in a document. A script can create a raster item from an external file, or by copying an existing raster item with the duplicate method.


app.activeDocument.rasterItems[index].artworkKnockout

Is this object used to create a knockout, and if so, what kind of knockout.

KnockoutState


app.activeDocument.rasterItems[index].bitsPerChannel

The number of bits per channel.

Number (long); read-only.


app.activeDocument.rasterItems[index].blendingMode

The blend mode used when compositing an object.

BlendModes


app.activeDocument.rasterItems[index].boundingBox

The dimensions of the placed art item regardless of transformations.

Array of 4 numbers


app.activeDocument.rasterItems[index].channels

The number of channels.

Number (long); read-only.


app.activeDocument.rasterItems[index].colorants

The colorants used in the raster art.

Array of string; read-only.


app.activeDocument.rasterItems[index].colorizedGrayscale

If true, the raster art is a colorized grayscale image.

Boolean; read-only.


app.activeDocument.rasterItems[index].contentVariable

The content variable bound to the item.

Variable


app.activeDocument.rasterItems[index].controlBounds

The bounds of the object including stroke width and controls.

Array of 4 numbers; read-only.


app.activeDocument.rasterItems[index].editable

If true, this item is editable.

Boolean; read-only.


app.activeDocument.rasterItems[index].embedded

If true, the raster art item is embedded in the illustration.

Boolean


app.activeDocument.rasterItems[index].file

The file containing the artwork.

File object; read-only.


app.activeDocument.rasterItems[index].geometricBounds

The bounds of the object excluding stroke width.

Array of 4 numbers; read-only.


app.activeDocument.rasterItems[index].height

The height of the group item.

Number (double)


app.activeDocument.rasterItems[index].hidden

If true, this item is hidden.

Boolean


app.activeDocument.rasterItems[index].imageColorSpace

The color space of the raster image.

ImageColorSpace; read-only.


app.activeDocument.rasterItems[index].isIsolated

If true, this object is isolated.

Boolean


app.activeDocument.rasterItems[index].layer

The layer to which this item belongs.

Layer; read-only.


app.activeDocument.rasterItems[index].left

The position of the left side of the item (in points, measured from the left side of the page).

Number (double)


app.activeDocument.rasterItems[index].locked

If true, this item is locked.

Boolean


app.activeDocument.rasterItems[index].matrix

The transformation matrix of the placed artwork.

Matrix


app.activeDocument.rasterItems[index].name

The name of this item.

String


app.activeDocument.rasterItems[index].note

The note assigned to this item.

String


app.activeDocument.rasterItems[index].opacity

The opacity of the object.

Range: 0.0 to 100.0

Number (double)


app.activeDocument.rasterItems[index].overprint

If true, the raster art overprints.

Boolean


app.activeDocument.rasterItems[index].parent

The parent of this object.

Layer or GroupItem


app.activeDocument.rasterItems[index].position

The position (in points) of the top left corner of the rasterItem object in the format [x, y]. Does not include stroke weight.

Array of 2 numbers; read-only.


app.activeDocument.rasterItems[index].selected

If true, this item is selected.

Boolean


app.activeDocument.rasterItems[index].sliced

If true, the item sliced.

Default: false

Boolean


app.activeDocument.rasterItems[index].status

Status of the linked image.

RasterLinkState


app.activeDocument.rasterItems[index].tags

The tags contained in this item.

Tags; read-only.


app.activeDocument.rasterItems[index].top

The position of the top of the item (in points, measured from the bottom of the page).

Number (double)


app.activeDocument.rasterItems[index].transparent

If true, the raster art is transparent.

Boolean; read-only.


app.activeDocument.rasterItems[index].typename

The class name of the referenced object.

String; read-only.


app.activeDocument.rasterItems[index].uRL

The value of the Adobe URL tag assigned to this item.

String


app.activeDocument.rasterItems[index].visibilityVariable

The visibility variable bound to the item.

Variable


app.activeDocument.rasterItems[index].visibleBounds

The visible bounds of the item including stroke width.

Array of 4 numbers; read-only.


app.activeDocument.rasterItems[index].width

The width of the item.

Number (double)


app.activeDocument.rasterItems[index].wrapInside

If true, the text frame object should be wrapped inside this object.

Boolean


app.activeDocument.rasterItems[index].wrapOffset

The offset to use when wrapping text around this object.

Number (double)


app.activeDocument.rasterItems[index].wrapped

If true, wrap text frame objects around this object (text frame must be above the object).

Boolean


app.activeDocument.rasterItems[index].zOrderPosition

The position of this item within the stacking order of the group or layer (parent) that contains the item.

Number; read-only.


app.activeDocument.rasterItems[index].colorize(rasterizeColor)

Colorizes the raster item with a CMYK or RGB Color.

ParameterTypeDescription
rasterizeColorColorCMYK or RGB Color to rasterize with

Nothing.


app.activeDocument.rasterItems[index].duplicate([relativeObject][, insertionLocation])

Creates a duplicate of the selected object.

ParameterTypeDescription
relativeObjectObject, optionalObject to duplicate to
insertionLocationElementPlacement, optionalLocation to insert element

RasterItem


app.activeDocument.rasterItems[index].move(relativeObject, insertionLocation)

Moves the object.

ParameterTypeDescription
relativeObjectObjectObject to move element within
insertionLocationElementPlacement, optionalLocation to move element to

RasterItem


app.activeDocument.rasterItems[index].remove()

Deletes this object.

Nothing.


app.activeDocument.rasterItems[index].resize(
scaleX,
scaleY
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,changeLineWidths]
[,scaleAbout]
)

Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 = 100%.

ParameterTypeDescription
scaleXNumber (double)Horizontal scaling factor
scaleYNumber (double)Vertical scaling factor
changePositionsBoolean, optionalWhether to effect art object positions and orientations
changeFillPatternsBoolean, optionalWhether to transform fill patterns
changeFillGradientsBoolean, optionalWhether to transform fill gradients
changeStrokePatternBoolean, optionalWhether to transform stroke patterns
changeLineWidthsNumber (double), optionalThe amount to scale line widths
scaleAboutTransformation, optionalThe point to use as anchor, to transform about

Nothing.


app.activeDocument.rasterItems[index].rotate(
angle
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,rotateAbout]
)

Rotates the art item relative to the current rotation.

The object is rotated counter-clockwise if the angle value is positive, clockwise if the value is negative.

ParameterTypeDescription
angleNumber (double)The angle amount to rotate the element
changePositionsBoolean, optionalWhether to effect art object positions and orientations
changeFillPatternsBoolean, optionalWhether to transform fill patterns
changeFillGradientsBoolean, optionalWhether to transform fill gradients
changeStrokePatternBoolean, optionalWhether to transform stroke patterns
rotateAboutTransformation, optionalThe point to use as anchor, to transform about

Nothing.


app.activeDocument.rasterItems[index].trace()

Converts the raster art for this object to vector art, using default options.

Reorders the raster art into the source art of a plug-in group, and converts it into a group of filled and/or stroked paths that resemble the original image.

Creates and returns a PluginItem object that references a TracingObject object.

PluginItem


app.activeDocument.rasterItems[index].transform(
transformationMatrix
[, changePositions]
[, changeFillPatterns]
[, changeFillGradients]
[, changeStrokePattern]
[, changeLineWidths]
[, transformAbout]
)

Transforms the art item by applying a transformation matrix.

ParameterTypeDescription
transformationMatrixMatrixTransformation matrix to apply
changePositionsBoolean, optionalWhether to change Positions
changeFillPatternsBoolean, optionalWhether to change Fill Patterns
changeFillGradientsBoolean, optionalWhether to change Fill Gradients
changeStrokePatternBoolean, optionalWhether to change Stroke Pattern
changeLineWidthsNumber (double), optionalThe amount to scale line widths
transformAboutTransformation, optionalThe point to use as anchor, to transform about

Nothing.


app.activeDocument.rasterItems[index].translate(
[deltaX]
[, deltaY]
[, transformObjects]
[, transformFillPatterns]
[, transformFillGradients]
[, transformStrokePatterns]
)

Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical offset.

ParameterTypeDescription
deltaXNumber (double), optionalHorizontal offset
deltaYNumber (double), optionalVertical offset
transformObjectsBoolean, optionalWhether to transform Objects
transformFillPatternsBoolean, optionalWhether to transform Fill Patterns
transformFillGradientsBoolean, optionalWhether to transform Fill Gradients
transformStrokePatternsBoolean, optionalWhether to transform Stroke Patterns

Nothing.


app.activeDocument.rasterItems[index].zOrder(zOrderCmd)

Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.

ParameterTypeDescription
zOrderCmdZOrderMethodStacking order arrangement method

Nothing.