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: 04:33:32 08/15/02 Thu
Author: Gurkan Karagoz
Subject: Re: Manipulating Multipage Tiffs in streams
In reply to: Gurkan Karagoz 's message, "Re: Manipulating Multipage Tiffs in streams" on 04:08:30 08/15/02 Thu

Dear Michel,
It worked. I just added this line and now I have what I need.
.
.
Do some transformation
.
.
Isb1.Frames[Isb1.CurrentFrame].Assign(Isb.Graphic);
.
.


>No Michel,
>All images will be stored in a single blob filed as
>multipage tif. I am sure that I can handle this with
>some code, but I just want to learn the mechanism.
>
>If I am loading all frames into memory, (all frames
>are in seperated Tdibgraphic, aren't they?) I can push
>the new image into that TDIBgraphic. Does it work?
>>
>>Hi Gurkan,
>>
>>You will need to save to the blob before move to
>>another images. For example, just after the
>>transformation, save the current graphic to a
>>TBlobStream,
>>
>>docView.Graphic.SaveToStream(BlobStream)
>>
>>where the BlobStream is associated to the field in
>>your table.
>>
>>Best regards,
>>
>>Michel
>>>Dear Michel,
>>>I am loading a multipage tif file by using the
>>>loadfromfile function with a parameter of 0. The help
>>>file says that 0 means, imagescrollbox will load all
>>>pages. That's correct, if I load a 39 pages tiff
>file,
>>>my application eats 47MB of memory, which is the
>proof
>>>of loading all images into memory. So, if I do a
>>>transformation,
>>>
>>>.
>>>.
>>>Transform.Apply(docview.Graphic);
>>>docview.Invalidate;
>>>docview.Redraw(true);
>>>.
>>>.
>>>I can see the result, but when I go to the next frame
>>>and then back to the first one, the transformation
>>>disappears. After loading a multipage tif file, I
>will
>>>insert it into a blob field, I won't use a disk file
>>>anymore. How can I do permanent transformations for
>>>frames?
>>>Thanks,
>>>
>>>>
>>>>Hi Gurkan,
>>>>
>>>>The key is to make sure you manipulate the images
>>>>before saving them in the tiff file. Keep 6 pages in
>>>>memory is not a problem. You can keep them in
>>>>individual TDibGraphic objects, in a TList, in
>>>>TMemoryStream's, etc...
>>>>
>>>>Best regards,
>>>>
>>>>Michel
>>>>
>>>>>I also need the same thing but for in memory
>frames.
>>>>>For a project, customer scans not more than 6
>pages,
>>>>>some pages need to be rotated 90 deg. left or
>right.
>>>>>That's why I always load all the images to memory.
>>>>>Is it possible doing permanent transformations for
>>in
>>>>>memory multiple images?
>>>>>
>>>>>>
>>>>>>Hi David,
>>>>>>
>>>>>>If you need to change an image within an existing
>>>>>>multipage file, unforntunately you need to create
>a
>>>>>>new file and copy the pages back to the new file.
>>>>>>
>>>>>>Your approach is good, but you could use a
>>>>>>TTiffGraphic directly instead of a
>TImageScrollBox.
>>>>>>Look up TFileStream in the Delphi help and the
>>>>>>TTiffGraphic.AppendToStream method in the Envision
>>>>>>help file. If you tiff file is not too large (a
>few
>>>>>>megabytes) you may want to use a TMemoryStream to
>>>>>>speed things up.
>>>>>>
>>>>>>Best regards,
>>>>>>
>>>>>>Michel
>>>>>>
>>>>>>>I need sample code on how to use streams with
>>>>>>>envision. Here is the problem:
>>>>>>>I need to be able to rotate page three, then save
>>>>the
>>>>>>>entire file with the changes to number three,
>>>>without
>>>>>>>appending the new version of three to the end of
>>>the
>>>>>>>file. The pages must stay in order, and the old
>>>>>>>version of page three is replaced with the new
>>>>>>version.
>>>>>>>I have been able to achieve this through the
>>>>>>>imagescrollbox control, by assigning page three
>to
>>>a
>>>>>>>second(hidden) imagescrollbox control, and then
>>>>>>>looping through the original appending the images
>>>>>till
>>>>>>>i hit the one i have changed, and then appending
>>>>the
>>>>>>>changed image from the second control, and
>>>>continuing
>>>>>>>on through the original. this works fine unless
>>the
>>>>>>>file is large, then it takes a long time to loop
>>>>>>>through the entire file.
>>>>>>>I thought maybe doing it with streams might speed
>>>up
>>>>>>>the process, but am unsure how to do it.(I have
>>not
>>>>>>>used streams very much at all). Any help or
>>example
>>>>>>>code you could give me would be helpful, the demo
>>>>>>>project that came with it did not help me on this
>>>>>>>matter.
>>>>>>>
>>>>>>>Thank you in advance for any help you can give.
>>>>>>>David L. Bracken

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


Replies:

  • Re: Manipulating Multipage Tiffs in streams -- Michel, 06:46:26 08/19/02 Mon
    [ 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.