ImageEn, unit iemio

TImageEnMIO.PrintImagesToFile

TImageEnMIO.PrintImagesToFile


Declaration

procedure PrintImagesToFile(const sFilename: string; iJpegQuality: Integer; iImageWidth, iImageHeight: integer; iColumns: integer; iRows: integer; iHorzSpace: Integer = 6; iVertSpace: Integer = 6; bPrintSelectedOnly: Boolean = False; iHorzMargin: Integer = 12; iVertMargin: Integer = 12; CellBorder: Boolean = False; ShowText: Boolean = True; DropShadow: Boolean = True; BackgroundColor: TColor = clWhite; BorderColor: TColor = clBlack; const Heading: string = ''; HeadingHeight: Integer = 5; HeadingColor: TColor = clBlack; iPageNo: Integer = -1; ImageBorder: boolean = False);


Description

Outputs multiple images (all or just selected) in the attached TImageEnMView or TIEMultiBitmap as rows and columns of thumbnails to a file.

Parameter Description
sFilename The destination filename for these thumbnails. If all pages are being printed (see iPageNo) then this filename will be automatically adjusted in the format image.jpg, image_2.jpg, image_3.jpg, etc.
iJpegQuality If sFilename is a JPEG file then specify the output quality (e.g. 80)
iImageWidth The output width for the image (in pixels)
iImageHeight The output height for the image (in pixels)
iColumns Specifies how many thumbnails span across the page
iRows Specifies how many thumbnails span down the page
iHorzSpace The horizontal space between thumbnails (in pixels)
iVertSpace The vertical space between thumbnails (in pixels)
bPrintSelectedOnly Set to true to print only selected images. False to print all image in the TImageEnMView
iHorzMargin Page margin on left and right of the image (in pixels)
iVertMargin Page margin on top and bottom of the image (in pixels)
CellBorder Set to true to draw a box around the each image cell (space containing the area of the image and its text)
ShowText Set to true to draw text associated with every image. Note: The font of the text will be used, e.g. BottomTextFont
DropShadow Set to true to draw a shadow around the image
BorderColor Specifies the color of the box around the image or cell (i.e. when CellBorder or ImageBorder is True)
Heading Specifies the heading to print at the top of the page. If you append ### (e.g. 'Thumbnails###') it will append "Page x" to printed pages after the first one
HeadingHeight The height of the heading, as a PERCENTAGE of the overall page height, e.g. 5 will make the heading 5% of the page height
HeadingColor Specifies the color of the heading text
iPageNo The page of thumbnails to output. If this is -1 (default) then all pages are output and the filename is automatically incremented
ImageBorder Set to true to draw a box around each thumbnail (edge of image)

Note:
 The images will maintain their aspect ratio when stretched
 Use the OnPrintPage or OnPrintPage event to customize the heading


Example

// Save image of thumbnails
ImageEnMView1.MIO.PrintImagesToFile('C:\SomeImage.jpg', 80, Screen.Width, Screen.Height, 6, 4, ...);


See Also

 PrintImages
 PrintImagesToBitmap
 OnPrintPage
 DoPrintPreviewDialog
 PreviewPrintImages