ImageInfo

Imageinfo is a single Java class that examines InputStream and RandomAccessFile objects. It checks whether the stream/file is in one of the supported image file formats and determines image width, height, and color depth. ImageInfo does not depend on the AWT or additional libraries.

Tags Utilities multimedia Graphics
Licenses Public Domain
Operating Systems OS Independent
Implementation Java

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  12 Nov 2006 21:02
  • Rrelease-after

Changes: This release fixes a bug that made ImageInfo reject JPEGs generated by Picasa. It fixes a bug when skipping input data on truncated bitstreams accessed via ByteArrayInputStream. There is some code cleanup.

  • Rrelease-mid
  •  28 Jul 2005 23:55
  • Rrelease-after

Changes: Support for SWF (Flash) files was removed. A package statement was added.

  • Rrelease-mid
  •  02 Jan 2005 00:47
  • Rrelease-after

Changes: This release removes unused fields and methods, adds missing method documentation, makes the class compatible with Java 1.1 again, fixes a bug with detection of progressive (interlaced) GIF files, and changes the compact output delimiter to tab for better integration with cut(1), etc.

  • Rrelease-mid
  •  29 Feb 2004 06:15
  • Rrelease-after

Changes: Support was added for recognizing progressive JPEG and interlaced PNG and GIF. A new method, isProgressive(), returns whether ImageInfo has found that an image was stored in more than one pass. The BMP physical resolution is now correctly determined.

  • Rrelease-mid
  •  28 Jul 2003 08:44
  • Rrelease-after

Changes: A bug with skipping data in files and streams was fixed. In rare cases, this may have led to less, corrupted, or no retrieved metadata.

Rss Recent comments

Rcomment-before 12 May 2006 16:38 Rcomment-trans tjhsiao Rcomment-after

Can't get it to work with GIF Files
Very happy with JPG (BMP and PNG) files. Can't seem to work/recognize GIF files.

Any idea?

Thanks.

Rcomment-before 26 May 2004 21:21 Rcomment-trans vvitayau Rcomment-after

add some package and fixing Boolean.toString
fyi : these were two modifications I had to change

to perform in order for jsp using ImageInfo to compile.

1. add some package - arguable

2. replace Boolean.toString()

1d0

< package net.freshmeat;

1071c1070

< printLine(1, "Progressive: ", ii.isProgressive() + "");

---

> printLine(1, "Progressive: ", Boolean.toString(ii.isProgressive()));

Rcomment-before 11 Feb 2003 23:17 Rcomment-trans mschmidt Rcomment-after

Re: Refactoring

> ImageInfo IS a very handy utility.
>
> Have you ever thought about refactoring
> it so it will be easier to use and
> maintenance? Using factory/builder
> pattern to return a info class; if
> format not supported then return null or
> throw an exception.

ImageInfo has grown quite a bit. It started out as a class to extract width and height from GIF, PNG and JPG. Now it can extract more from more formats, and in order for it to grow even further it would certainly have to be refactored. However, I don't intend to write a 'real' meta data extraction library right now, as useful as that would be. Someone would have to start a new project for that. ImageInfo might be a good basis for such a library.

Marco

Rcomment-before 09 Feb 2003 21:33 Rcomment-trans ajaxliang Rcomment-after

Refactoring
ImageInfo IS a very handy utility.

Have you ever thought about refactoring it so it will be easier to use and maintenance? Using factory/builder pattern to return a info class; if format not supported then return null or throw an exception.

Af662ed8316ef319d54b5e3e30bc5a4c_thumb

Project Spotlight

GTPing

A ping utility for GTP.

A50ea20d6ee52db032567afa5172a542_thumb

Project Spotlight

UPnP-Inspector

An UPnP device and service analyzer and debugging tool.