Solved

Getting Stats from a Picture File

Posted on 2002-07-10
7
134 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
Comment Utility
0
 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
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
Comment Utility
So far, I don't have a production level solution.  So - I'm adding some points!
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
0
 
LVL 1

Author Comment

by:khampton
Comment Utility
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
Comment Utility
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
Comment Utility
Question placed in PAQ

Computer101
E-E Admin
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now