Solved

How do I use GetEncoderParameterList?

Posted on 2006-07-21
4
1,664 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:mdgower
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
SnowFlake earned 500 total points
ID: 17152967
0
 

Author Comment

by:mdgower
ID: 17153455
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
0
 
LVL 15

Expert Comment

by:SnowFlake
ID: 17162454
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/
0
 

Author Comment

by:mdgower
ID: 17182230
Thanks Snowflake.  I couldn't quite find the answer I was looking for but certainly the problem has been resolved at least.  Thanks again.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question