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: 12[3]45678910 ]


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

Date Posted: 03:57:36 06/16/03 Mon
Author: Isaac Aaron
Subject: Re: Insert an Image to a TTiffGraphic (or a TDIBGraphic)
In reply to: Michel 's message, "Re: Insert an Image to a TTiffGraphic (or a TDIBGraphic)" on 21:07:49 06/11/03 Wed

Hi Michel

I have made the changes and it worked.

Comments:
1. I only tested InsertImage. Append should work, but I really don't have enough time to check it.
2. I changed EnTiffGr and not the dib unit because the subclasses provide the ability to span multiple pages by themselves (that's a bit more than what I want to get into).

Now what I'm really looking for is some form of annotations... Perhaps we can work on it together?

Thanks,
Isaac (Itzik) Aaron
Quality Bytes
TEL: +972-3-952 3175
FAX: +972-3-952 3176



// Quality Bytes
procedure TTiffGraphic.InsertImage(Graphic: TTiffGraphic);

var
i : Integer;
tmpGraphic : TDibGraphic;
begin
FMultiLoad := True;

tmpGraphic := TTiffGraphic.Create;
tmpGraphic.Assign( Self );
FFrames.Add( tmpGraphic ); // Memory leaks?

tmpGraphic := TTiffGraphic.Create;
tmpGraphic.Assign( Graphic );

if tmpGraphic.FrameCount = 0 then // Single/Multi Page
begin
FFrames.Insert(0, tmpGraphic );
FCurrentFrame := FCurrentFrame + 1;
end
else
begin
for i := tmpGraphic.FrameCount downto 1 do
FFrames.Insert(0, tmpGraphic.Frames[i] );
FCurrentFrame := FCurrentFrame + tmpGraphic.FrameCount;
end;
end;

// Quality Bytes
procedure TTiffGraphic.AppendImage(Graphic: TTiffGraphic);

var
i : Integer;
tmpGraphic : TDibGraphic;
begin
FMultiLoad := True;

tmpGraphic := TTiffGraphic.Create;
tmpGraphic.Assign( Self );
FFrames.Add( tmpGraphic ); // Memory leaks?

tmpGraphic := TTiffGraphic.Create;
tmpGraphic.Assign( Graphic );

if tmpGraphic.FrameCount = 0 then // Single/Multi Page
FFrames.Add( tmpGraphic )
else
for i := 1 to tmpGraphic.FrameCount do
FFrames.Add(tmpGraphic.Frames[i] );
end;

>
>Hi Isaac,
>
>Yes, you can probably work at frame level. Let me know
>how it goes and if you want me to integrate some
>changes.
>
>Best regards,
>
>Michel
>
>
>>How about, if I change the source a little bit, and
>>access Frames and FrameCount, copy the framges to the
>>target images (and increase FrameCount).
>>
>>Can that work? I can even create a new method and send
>>it to you.
>>
>>>
>>>Hi Isaac,
>>>
>>>If I understand correctly, you have two separate tiff
>>>images and would like to create a multipage tiff.
>>>
>>>Load each image individual in a TTiffGraphic using
>>>LoadFromStream, and in another TTiffGraphic instance,
>>>use SaveToStream on the first image, then
>>>AppendToStream to store the second image.
>>>
>>>See the section on working with multipage files in
>the
>>>User's guide section in the help file for other
>hints.
>>>
>>>Best regards,
>>>
>>>Michel
>>>
>>>
>>>>Hi
>>>>
>>>>I need to load images from two different BLOB
>>streams,
>>>>which contain TIFF images, into one sequential
>>>>TDIBGraphic and display it one the screen.
>>>>
>>>>How can I do that?
>>>>
>>>>Thanks,
>>>>Isaac Aaron
>>>>Quality Bytes

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