VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ 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 ]

Post a message:
This forum requires an account to post.
[ Create Account ]
[ Login ]
[ Contact Forum Admin ]


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