ImageEn, unit iemio

TImageEnMIO.PrintImagesToFile

TImageEnMIO.PrintImagesToFile

Declaration

procedure PrintImagesToFile(const Filename: string; JpegQuality: Integer; ImageWidth, ImageHeight: integer; ColCount: integer; RowCount: integer; HorzSpace: Integer = 6; VertSpace: Integer = 6; PrintSelectedOnly: Boolean = False; HorzMargin: Integer = 12; VertMargin: 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; PageNo: Integer = -1; ImageBorder: boolean = False; ClipImages: 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
Filename The destination filename for these thumbnails. If all pages are being printed (see PageNo) then this filename will be automatically adjusted in the format image.jpg, image_2.jpg, image_3.jpg, etc.
JpegQuality If Filename is a JPEG file then specify the output quality (e.g. 80)
ImageWidth The output width for the image (in pixels)
ImageHeight The output height for the image (in pixels)
ColCount Specifies how many thumbnails span across the page
RowCount Specifies how many thumbnails span down the page
HorzSpace The horizontal space between thumbnails (in pixels)
VertSpace The vertical space between thumbnails (in pixels)
PrintSelectedOnly Set to true to print only selected images. False to print all image in the TImageEnMView
HorzMargin Page margin on left and right of the image (in pixels)
VertMargin 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
PageNo 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)
ClipImages Set to display images cropped to the ratio of the output (i.e. left/right or top/bottom of the image will be discarded to avoid space around the thumbnail

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, 4, 3, ...);

See Also

PrintImages
PrintImagesToBitmap
OnPrintPage
DoPrintPreviewDialog
PreviewPrintImages