Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Getting Stats from a Picture File

Posted on 2002-07-10
7
Medium Priority
?
146 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
[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
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Suggested Courses

618 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