ImageEn, unit iemio

TImageEnMIO.PrintImagesToBitmap

TImageEnMIO.PrintImagesToBitmap


Declaration


function PrintImagesToBitmap(Dest: TIEBitmap; iImageWidth, iImageHeight: integer; iColumns : integer; iRows : integer; iHorzSpace : Integer = 6; iVertSpace : Integer = 6; bPrintSelectedOnly: Boolean = False; iHorzMargin : Integer = 12; iVertMargin : Integer = 12; bDrawBox : Boolean = False; bDrawText : Boolean = True; bDrawShadow : Boolean = True; BackgroundColor : TColor = clWhite; BoxColor: TColor = clBlack; const Heading: string = ''; HeadingHeight: Integer = 5; HeadingColor: TColor = clBlack; iPageNo : Integer = 0): Integer;


Description


Outputs multiple images (all or just selected) in the attached TImageEnMView or TIEMultiBitmap as rows and columns of thumbnails to a file.
Result is the number of pages (bitmaps) required to output all thumbnails.

Parameter Description
Dest The destination bitmap for these thumbnails. If iPageNo is not set, then only the first page will be output. Dest can be nil to return the count of pages.
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)
bDrawBox Set to true to draw a box around the images (image space). Image is always stretched to maintain aspect ratio.
bDrawText Set to true to draw text associated with every image.
bDrawShadow Set to true to draw a shadow around the image.
BackgroundColor Specifies the fill color of the image.
BoxColor Specifies the color of the box around the image if DrawBox 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.


Note: Use the OnPrintPage or OnPrintPage event to customize the heading


Example


// Save image of thumbnails
ImageEnMView1.MIO.PrintImagesToBitmap(MyBitmap, Screen.Width, Screen.Height, 6, 4, ...);

// Get number of bitmaps needed to output all thumbnails
pageCount := ImageEnMView1.MIO.PrintImagesToBitmap(nil, Screen.Width, Screen.Height, 6, 4, ...);


See Also


- PrintImages
- PrintImagesToFile
- OnPrintPage
- DoPrintPreviewDialog
- PreviewPrintImages