×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to check the TIFF type?

How to check the TIFF type?

How to check the TIFF type?

(OP)
Colleagues,
Not sure this is the place for this question, but I dunno where else...
I hope you're all familiar with the TIFF image file format.
TIFF may store raster image of bilevel (B&W) format, grayscale format, or color (palette or full RGB).
It can also have this image info As-Is, or compressed (LZW or ZIP).
Here's the question:
Is there a way to programmatically extract this above information from a TIFF file on disk? E.g. - B&W or RGB? Compressed oar not?

TIA!

Regards,

Ilya

RE: How to check the TIFF type?

You may want to Google something like "vb net tiff file attributes"

This is one of the hits I've got. Looks interesting...

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: How to check the TIFF type?

(OP)
I ran search for "TIFF file header" - nothing useful came back.
The one you've provided does look promising - thank you!

But!
To try it requires downloading and installing and registering an OCX - which policy of the company I work for forbids. sad

Actually, I was hoping to find the info on where these TIFF file attributes (e.g. color scheme and compression type and ratio) are stored in the file itself, so I could extract it.
Any idea on how-to?

Regards,

Ilya

RE: How to check the TIFF type?

A System.Drawing.Bitmap contains the following properties:

PropertyIDList

which contains a list of 'well-known' image property IDs. Ypu need to match the ID to a proper string. The TIFF IDs are documented by Adobe in https://www.adobe.io/content/dam/udp/en/open/stand... (check the appendix)

PrropertyItems

which is a collection of ProprtyItems; a ProprtyItem maps the ID to an ac tual value - but not directly - it contains the ID, the the length (in bytes) of the Value, the types of the value, and the value itself - you need to determine the type, and then interpret the raw Value as that type ... (the types are outlined here: https://docs.microsoft.com/en-us/dotnet/api/system...)

Good luck ...

Of course one question would be - why do you need this TIFF metadata?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close