RtfPicture

constructor(bytes: ByteArray, format: RtfPictureFormat, widthPx: Int, heightPx: Int, goalWidthTwips: Int? = null, goalHeightTwips: Int? = null, style: RtfParagraphStyle = RtfParagraphStyle.Default)(source)

Parameters

bytes

the encoded image file, in format.

format

the image encoding of bytes.

widthPx

the image's width in pixels (\picwN).

heightPx

the image's height in pixels (\pichN).

goalWidthTwips

the rendered width in twips (\picwgoalN). When only one goal is given the other follows from the pixel aspect ratio; when neither is, both come from the pixel size at 96 dpi (15 twips per pixel), which exceeds a 6.5 inch text width for images wider than 624 px, so pass a goal for large images.

goalHeightTwips

the rendered height in twips (\pichgoalN).

style

the layout of the paragraph holding the picture, such as its alignment and spacing.