Rasterize

image\bltlrgss.gif Editions  image\bltlrgss.gif Related Transactions image\bltlrgss.gif Example

The Rasterize transaction combines the specified layers in the document window and converts them into a raster image. It combines features available in the Merge, ResizePage, and ChangeRaster functions.

Type XTYP_EXECUTE or XTYP_REQUEST

Syntax [Rasterize(docwinID, pageID, rasterizeType, colorDepth, dither, threshold, xResolution, yResolution, orientation, imageSizeX, imageSizeY, imageUnits)]

Parameters

Data type

Values

Meaning

docwinID

DWORD

0 | docwinID

active | specific

pageID

DWORD

-1

all pages

 

 

0

current page

 

 

pageID

specific page

rasterizeType

WORD

0

specify in dialog box

 

 

1

whole page

 

 

2

displayed layers

 

 

3

as displayed

 

 

4

displayed raster layers

 

 

5

displayed edit layers

 

 

6

active raster layer

 

 

7

active edit layer

colorDepth

WORD

defines the color depth of the new raster image:

 

 

1

bilevel

 

 

2

bilevel dithered

 

 

3

8-bit grayscale

 

 

4

8-bit color

 

 

5

24-bit color

dither

WORD

defines what dither pattern to use:

 

 

0

No pattern. Use this value for now.

 

 

1

Error diffusion dither. Reserved for future use.

threshold

WORD

-100 to 100

Lightness of dithering. Valid only if bilevel or bilevel dithered is used for colorDepth.

xResolution

WORD

0

current resolution. See Remarks.

 

 

10 to 4000

horizontal dots per inch

yResolution

WORD

0

current resolution. Must be used if xResolution is 0.

 

 

10 to 4000

vertical dots per inch

orientation

WORD

orientation of the new image. This is a data transformation, not a header rotation.

 

 

0

no orientation change

 

 

1

0 degrees

 

 

2

90 degrees CCW from the original

 

 

3

180 degrees

 

 

4

270 degrees CCW from the original

 

 

5

portrait orientation

 

 

6

landscape orientation

imageSizeX

WORD

0 | size value

existing width | new width

imageSizeY

WORD

0 | size value

existing length | new length. See Remarks.

imageUnits

WORD

units used by imageSizeX and imageSizeY

 

 

1

inches

 

 

2

centimeters

 

 

4

feet

 

 

5

millimeters

 

 

6

meters

Reply

Data type

Meaning

newDocwinID

DWORD

identifier of the window containing the rasterized image. See Remarks.

Remarks

The current resolution is determined by the active raster layer on the page, if any, or the first raster, if no raster layers are active. If the page contains only edit layers, then the current resolution is 1200 dpi.

The imageSizeX and imageSizeY values must either both be set to 0, or both be set to a size value. You cannot use 0 for one and a size value for the other. When both are set to 0, the imageUnits value is ignored.

Replies are only returned when this transaction is called as an XTYP_REQUEST. If the overwrite raster flag is set to on, newDocwinID is the original docwinID.

Release information

Added in Release 5.13.

See also

Rasterizing layers