Some very good and easy to use functions are in the iexHelperFunctions unit. The functions include IEConvertToThumbnail for Bitmaps and IEBitmaps that quickly produce thumbnails with various effects including border color and shadows.
You can save all the image frames in ImageEnMView as full size tif files along with jpg thumbnails for each:
procedure TForm1.CreateAndSaveAll1Click(Sender: TObject);
var
i: Integer;
iIEBitmap: TIEBitmap;
iFolder: string;
iTifFilename: string;
iThumbnailFilename: string;
begin
for i := 0 to ImageEnMView1.ImageCount - 1 do
begin
{ Get the full size image from the selected ImageEnMView frame }
iIEBitmap := ImageEnMView1.GetTIEBitmap(i);
try
iFolder := DesktopFolder;
{ Create the tif file filename }
iTifFilename := iFolder +
JustName(ImageEnMView1.MIO.Params[i].FileName) + '.tif';
{ Create the jpg thumbnail filename }
iThumbnailFilename := iFolder +
JustName(ImageEnMView1.MIO.Params[i].FileName) + '_thumbnail.jpg';
{ Save all images stored in ImageEnMView as full size tif files }
iIEBitmap.IESaveToFile(iTifFilename, ioTIFF);
{ Convert the full image to a thumbnail }
iIEBitmap.IEConvertToThumbnail(150, 116, Stretch1.Checked, rfLanczos3,
AddBorder1.Checked, BorderColor1.Selected, AddShadow1.Checked, 0,
StrToIntDef(ShadowOffset1.Text, 4), ShadowColor1.Selected,
BackgroundColor1.Selected);
{ Save all thumbnails as jpg }
iIEBitmap.IESaveToFile(iThumbnailFilename, ioJPEG);
finally
ImageEnMView1.ReleaseBitmap(ImageEnMView1.SelectedImage);
end;
end;
end;
A complete demo written with IE 6.0 and XE7 can be downloaded here: http://www.xecute.com/ieforum/topic.asp?whichpage=3&TOPIC_ID=1446#7857
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development