Solved

Getting Stats from a Picture File

Posted on 2002-07-10
7
138 Views
Last Modified: 2010-05-02
I want to list out every possible statistic about an image file (.bmp, .jpg, etc).

The stats would include size, number of colors, compression data, etc.  

Rather than spending my time researching this problem and re-inventing the wheel, I'm hoping that an expert already has solved this problem.

Please supply the necessary code and api's to do this.

Thanks!
0
Comment
Question by:khampton
7 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7144389
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7144684
I'm sure it's available somewhere, but if you open the file as a binary, most of that info is available in the header.

For example, open a bitmap and it starts with "BM"  Within the next few bytes you'll find picture size, number of color planes, etc.

For a .gif, it starts with "GIF87" or "GIF89", possibly followed by an "a".

For .jpg, bytes 7-10 contain "JFIF".

0
 
LVL 1

Author Comment

by:khampton
ID: 7165527
So far, I don't have a production level solution.  So - I'm adding some points!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7165767
0
 
LVL 1

Author Comment

by:khampton
ID: 7165822
Richie:

Your pointer goes to a site that posts code that will work for .bmp files BUT NOT .jpg files.

Sorry but I need to analyze all types of image files.

(However, Thanks for the hint).
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8002280
Hi khampton,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

khampton, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 8094161
Question placed in PAQ

Computer101
E-E Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 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