Link to home
Start Free TrialLog in
Avatar of mdgower
mdgower

asked on

How do I use GetEncoderParameterList?

Hi Experts,

What I really want to do is examine a TIFF file and check the compression method as we want to ensure that only files with CCITT FAX3 compression are accepted.  It's taken me a while to consider using GetEncoderParameterList and now that I have I don't seem able to make it work and can't find appropriate examples on the internet.  Can anybody help?

I imagine what I want to do is something like:

Create the image.
Get the Parameter list.
Check the compression parameter.

Seems simple but I'm struggling, probably because of all the Guid involvement which leaves me with a headache!  I don't know how to do this so haven't posted any code, but I'll reply soonest if you need anything.

Many thanks,
Mark
ASKER CERTIFIED SOLUTION
Avatar of SnowFlake
SnowFlake
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mdgower
mdgower

ASKER

Helps tremendously, thank you.

The question this raises for me now is how to be sure that PropertyItem(259) always refers to the compression method?  I'm sure that it does otherwise this code would be almost useless, but I'd be grateful if someone could explain to me why?  Why is it 259 at all, in fact?

Also, can anybody demonstate the use of GetEncoderParameterList to read rather than just save a parameter?

While I welcome these answers and will award points for them, the bulk will certainly go to SnowFlake for resolving my immediate issue.

Many thanks,
Mark
I am not directly familiar with Tiff structure,
but I guess this is just a fixed index definied in the structure of the file pointing to this information.

the proff for this might be buried somewhere in here:
http://www.ee.cooper.edu/courses/course_pages/past_courses/EE458/TIFF/
Avatar of mdgower

ASKER

Thanks Snowflake.  I couldn't quite find the answer I was looking for but certainly the problem has been resolved at least.  Thanks again.