File Exploration is Disabled

We're sorry, but errors in the uploaded zip file prevent it from being explored.

The error generated by the Zip attachment is:

You may still be able to repair the zip file contents if you download the entire zip locally. You may also want to ask the author to repost the attachment.

Description

TThumbnail creates a thumbnail from a bitmap, JPEG, GIF, PNG, icon or metafile. The image may be assigned from a TBitmap, TJPEGImage, TGIFImage, TPNGObject, TIcon, TMetafile or TPicture, or the file name passed as a parameter to Execute.

It creates one of three kinds of thumbnails:

1: a thumbnail which maintains the original image's aspect ratio;
2: a thumbnail which stretches to MaxHeight and MaxWidth;
3: a thumbnail which maintains the original image's aspect ratio on a coloured background stretched to MaxHeight and MaxWidth.

If there is an exception then an error thumbnail consisting of a white background with a diagonal red cross is created instead.

The thumbnail is returned as a TBitmap but may be saved to file in any of the supported formats.

It would be used something like this:

JPEGImage.LoadFromFile(aFileName);
Thumbnail.Assign(JPEGImage);
if Thumbnail.Execute then
Image.Picture.Assign(Thumbnail.Bitmap);

TThumbnail 2.0 was developed and tested in D6 Pro. It should work in D5 also. It is a significant improvement on 1.3. It is more memory efficient because it no longer uses one of each type of Graphics object and output quality is significantly improved because it uses the JEDI VCL (Jcl) Stretch procedure when resizing rather than StretchDraw (although the downside is that Stretch seems subjectively slower than StretchDraw). This means TThumbnail is now suitable as a general purpose image resizing tool rather than as just a generator of low quality thumbnails.

DEPENDENCIES:

Note: this object uses
1: Anders Melander's TGIFImage, which can be
downloaded from http://www.melander.dk/delphi/gifimage/index.html.
2: Gustavo Daud's TPNGObject, which can be
downloaded from http://pngdelphi.sourceforge.net/.
3: JEDI VCL (tested with v1.21), which can be
downloaded from http://jcl.sourceforge.net/