VoyForums

VoyUser Login optional ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12345678910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 17:34:21 07/17/08 Thu
Author: Jon Grewer
Subject: 1 question

I am trying to use your TThumbnailMaker component in a program. I took the code below straight out of the demo with little modification:
It won't create a thumbnail from a JPG file though the same file works in the demo. ThumbnailCreator.FileCount = 0.
I traced the code and FindDibGraphicClass fails to find a DIB class for 'JPG'.

Could you point me in the right direction? Thanks!

Kind regards,
- Jon Grewer

procedure TForm1.Button2Click(Sender: TObject);
var
ThumbnailCreator : TThumbnailCreator;
FileNameMask : String;
OutputDirectory : String;
begin
FileNameMask := LastImage;
if not InputQuery( 'Thumbnail creation source', 'Example, C:\IMAGES\*.JPG', FileNameMask ) then
Exit;
{ Mar 12, 2003. Output was previously hardcoded to c:\temp }
OutputDirectory := FNBO.Path(LastImage);
if not InputQuery( 'Output directory', '', OutputDirectory ) then
Exit;
ThumbnailCreator := TThumbnailCreator.Create;
try
// ThumbnailCreator.OnProgress := Self.OnProgress;
ThumbnailCreator.EnlargeSmallImages := True;
ThumbnailCreator.AddFile( FileNameMask );
if ThumbnailCreator.FileCount = 0 then
begin
MessageDlg('Thumbnail file list is empty', mtError, [mbOk], 0);
Exit;
end;
ThumbnailCreator.OutputDirectory := OutputDirectory;
ThumbnailCreator.BackgroundColor := MakeRgb( 0, 0, 128 );
ThumbnailCreator.OverrideDestFormat := True;
ThumbnailCreator.DestFormat := ifTrueColor;
ThumbnailCreator.Execute;
finally
ThumbnailCreator.Free;
end;
end;

[ Next Thread | Previous Thread | Next Message | Previous Message ]

VoyUser Login ] Not required to post.
Post a public reply to this message | Go post a new public message
* Notice: Posting problems? [ Click here ]
* HTML allowed in marked fields.
Message subject (required):

Name (required):

  Expression (Optional mood/title along with your name) Examples: (happy, sad, The Joyful, etc.) help)

  E-mail address (optional):

Type your message here:


Notice: Copies of your message may remain on this and other systems on internet. Please be respectful.

[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 2.94, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2008 Voyager Info-Systems. All Rights Reserved.