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


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

Date Posted: 17:35:21 06/20/02 Thu
Author: Michel
Subject: Re: Converting tiff to jpg
In reply to: Tommy Baitz 's message, "Re: Converting tiff to jpg" on 15:37:02 06/20/02 Thu


Hi Tommy,

Have you tried leaving the destination as True color? Is the original true color or black and white. I have done a similar application, where instead of returning a JPEG I return a PNG to the browser, and I use the new anti-alias transform in version 2 which resize faster.

Best regards,

Michel

>Thanks for the idea. It does indeed speed up the
>conversion but Im afraid the quality is too poor.
>>
>>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,
>>
>>Michel
>>
>>>Hi,
>>>
>>>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 ]


Replies:


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