Projects / ImageInfo

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
Licenses
Operating Systems
Implementation

Recent releases

  •  13 Nov 2006 05:02

    Release Notes: 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.

    •  29 Jul 2005 06:55

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

      •  02 Jan 2005 08:47

        Release Notes: 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.

        •  29 Feb 2004 14:15

          Release Notes: 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.

          •  28 Jul 2003 15:44

            Release Notes: 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.

            Recent comments

            12 May 2006 16:38 tjhsiao

            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.

            26 May 2004 21:21 vvitayau

            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()));

            11 Feb 2003 23:17 mschmidt

            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

            09 Feb 2003 21:33 ajaxliang

            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.

            Screenshot

            Project Spotlight

            OpenStack4j

            A Fluent OpenStack client API for Java.

            Screenshot

            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.