[ 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: 13:02:53 11/08/00 Wed
Author: Kyle Boatwright
Subject: Re: Deleting a page in a multi-page tiff
In reply to: Kyle Boatwright 's message, "Deleting a page in a multi-page tiff" on 12:15:54 11/08/00 Wed

> I would like to allow my users the option to delete a
> page in a multi-page TIFF. I've tried a number of
> solutions the current is this:
> var
> iCurrImg: Integer;
> iImgCnt: Integer;
> i: Integer;
> tgrSource: TTiffGraphic;
> fsDest: TFileStream;
> begin
> //TODO: Verify page delete
> tgrSource := TTiffGraphic.Create;
> fsDest :=
> TFileStream.Create(AddBackSlash(msPrivDir) +
> '$$Wrk.TIF', fmCreate);
> iImgCnt := Image1.FrameCount; //Current number of
> frames
> iCurrImg := Image1.CurrentFrame; //Current frame in
> view (to delete)
> msViewImage.Seek(0, soFromBeginning);
> for i := 1 to iImgCnt do begin
> if i <> iCurrImg then begin
> tgrSource.SingleLoadFromStream(msViewImage, i);
> tgrSource.AppendToStream(fsDest);
> end;
> end;
> fsDest.Seek(0, soFromBeginning);
> Image1.LoadFromStream(fsDest, 'TIF', 0);
> fsDest.Free;
> end;
> This works OK except the ImageCount gets hosed up and
> ends up zero and the current image becomes -1. What
> am I doing wrong???
> Thanks for your help!
> Kyle Boatwright
The problem seems to manifest itself if I save the contents of the TImageScrollBox (the contents being a multi-page tiff). I have tried both SaveToStream and SaveToFile.

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


  • Re: Deleting a page in a multi-page tiff -- Michel, 07:39:04 11/09/00 Thu
  • Re: Deleting a page in a multi-page tiff -- Kyle Boatwright, 18:20:18 11/09/00 Thu
    [ 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.