[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

Extracting the propertyitems of a frame in a multipage tiff

Etan Bukiet

12/15/2004 8:50:00 PM

Maybe Bob can help me out on this one.

I am developing a photo album application and want to use tiff images as a
sort of container for images that look the same. Anyhow, I was looking at
how GDI+ deals with tiffs and I found out how to paint the image onto
another canvas, but not how to actually get at the bits of the "sub" image.
I want to get at the sub image so that I can access the property items.

I think that the best way to do this is to stream the image out to a memory
stream and then read it back in. However, I can not find a way to stream
only one frame out.

Help from anyone is much appreciated.


2 Answers

Bob Powell

12/16/2004 5:02:00 PM

0

Hmm, I don't even know if the property items are retained once an image is
placed in a multiframe TIFF.

I'll have to investigate.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Etan Bukiet" <ebukiet@comcast.net> wrote in message
news:OrBmXeu4EHA.4004@tk2msftngp13.phx.gbl...
> Maybe Bob can help me out on this one.
>
> I am developing a photo album application and want to use tiff images as a
> sort of container for images that look the same. Anyhow, I was looking at
> how GDI+ deals with tiffs and I found out how to paint the image onto
> another canvas, but not how to actually get at the bits of the "sub"
image.
> I want to get at the sub image so that I can access the property items.
>
> I think that the best way to do this is to stream the image out to a
memory
> stream and then read it back in. However, I can not find a way to stream
> only one frame out.
>
> Help from anyone is much appreciated.
>
>


Etan Bukiet

12/16/2004 5:31:00 PM

0

bob:

Thanks. After further investigation I think that you are right, when
writing a multiple page tiff image, the property items of each frame are
discarded.

I thought about it and really what I can do to get around this is store the
property items of the child images in the tiff image. I think with an
ingenious propertyID numbering system it might be possible.

I actually thought of making my own multipage-image-format. Now on the
surface it sounds pretty complicated however, if you keep in mind .Net
serialization you just create a class with a List<Image> (Generic List) and
serialize the object to a file. Extracting the image is just as easy.
Anyway, I am not going to use this because then other programs wont be able
to read this new image format.

Thanks.

If you want to check out a very basic photoviewer [a photo album program]
(the program I was talking about in the last post) check out the
codeproject: http://www.codeproject.com/csharp/EtanPhot...

Etan Bukiet

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:eQsuIE54EHA.3380@TK2MSFTNGP09.phx.gbl...
> Hmm, I don't even know if the property items are retained once an image is
> placed in a multiframe TIFF.
>
> I'll have to investigate.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tips...
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/f...
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "Etan Bukiet" <ebukiet@comcast.net> wrote in message
> news:OrBmXeu4EHA.4004@tk2msftngp13.phx.gbl...
>> Maybe Bob can help me out on this one.
>>
>> I am developing a photo album application and want to use tiff images as
>> a
>> sort of container for images that look the same. Anyhow, I was looking
>> at
>> how GDI+ deals with tiffs and I found out how to paint the image onto
>> another canvas, but not how to actually get at the bits of the "sub"
> image.
>> I want to get at the sub image so that I can access the property items.
>>
>> I think that the best way to do this is to stream the image out to a
> memory
>> stream and then read it back in. However, I can not find a way to stream
>> only one frame out.
>>
>> Help from anyone is much appreciated.
>>
>>
>
>