[ 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: 1234[5]678910 ]

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

Date Posted: 06:37:30 06/20/02 Thu
Author: Michel
Subject: Re: Converting tiff to jpg
In reply to: Tommy Baitz 's message, "Converting tiff to jpg" on 09:30:09 06/19/02 Wed

Hi Tommy,

For speed, set Interpolated := False and make the destination image format true color. JPEG compresses well with true color, so there will be no need to "palettize" the image. On the web with JPEG images the quality may be acceptable.

Best regards,


>I have written an ISAPI dll to convert tif to jpg on
>the fly so that the browser can display the image. I
>basically use the following code. Everything works
>perfectly except for one thing of course. That is
>speed. The TResizeTransform takes a long time. Is
>there any way to speed it up?
>The MemStream has the image in it.
> tif := TTiffGraphic.Create;
> MemStream.Position := 0;
> try
> tif.LoadFromStream(MemStream);
> except
> ErrFlag := true;
> end;
> with TResizeTransform.Create do
> try
> Width := 400;
> Height := 550;
> DestFormat := ifGray256;
> OverrideDestFormat := true;
> Interpolated := true;
> Apply(tif);
> finally
> Free;
> end;
> with TJpegGraphic.Create do
> try
> SaveQuality := 80;
> SaveProgressive := true;
> Assign(tif);
> SaveToStream(MemStream);
> finally
> Free;
> end;
> tif.Free;

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


[ 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.