Solved

Getting Stats from a Picture File

Posted on 2002-07-10
7
137 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

856 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