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: 12345678[9]10 ]


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

Date Posted: 07:01:45 08/30/00 Wed
Author: Michel
Subject: Re: making tiff smaller results in Small Black Rectangle (SBR)
In reply to: Tobias 's message, "making tiff smaller results in Small Black Rectangle (SBR)" on 06:12:28 08/29/00 Tue


Hi Tobias,

Thank you for reporting this. There is a problem with the new RowsPerStrip property not being assigned when the TTiffGraphic is not loaded from a file. In your example, add,

tiffDest.RowsPerStrip := tiffpic.RowsPerStrip;

before saving the tiffDest.

I will have this corrected shortly in the TTiffGraphic class.

Best regards,

Michel


> Hi,
> when resizing a tiff image to a smaller size with the
> code shown below, the output is a small black (or
> speckled) rectangle, depending on the size. I´m
> working on a tiff support for a thumbnailer, and it´s
> no alternative to convert the tiff to a jpg first and
> resize it then, eighter. resizing jpgs with a jpg
> source file works fine. is there a solution for this ?
>
> procedure TForm1.Button1Click(Sender: TObject);
> var tiffpic, tiffdest : TTiffGraphic;
> Resize : TResizeTransform;
> begin
> if Opendialog1.Execute
> then begin
> tiffpic := TTiffGraphic.Create;
> tiffpic.LoadFromFile(opendialog1.Filename);
> resize := TResizeTransform.Create;
> tiffdest := TTiffGraphic.Create;
> Resize := TResizeTransform.Create;
> try
> Resize.Width := 95;
> Resize.Height := 65;
> //TRY WIDTH := 90, HEIGHT := 69 AND BE
> SURPRISED !
>
> Resize.ApplyOnDest(tiffpic, tiffdest);
> finally
> Resize.Free;
> end; //finally
> tiffdest.SaveToFile('c:\bilder\knurz.tif');
> tiffpic.Free;
> //tiffdest.Free;
>
> end;
> end;

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