TwelveMonkeys ImageIO: Additional plug-ins and extensions for Java's ImageIO

Overview

Build Status Maven Central StackOverflow Donate

About

TwelveMonkeys ImageIO is a collection of plugins and extensions for Java's ImageIO.

These plugins extend the number of image file formats supported in Java, using the javax.imageio.* package. The main purpose of this project is to provide support for formats not covered by the JRE itself.

Support for formats is important, both to be able to read data found "in the wild", as well as to maintain access to data in legacy formats. Because there is lots of legacy data out there, we see the need for open implementations of readers for popular formats. The goal is to create a set of efficient and robust ImageIO plug-ins, that can be distributed independently.


File formats supported

Plugin Format Description Read Write Metadata Notes
Batik SVG Scalable Vector Graphics - - Requires Batik
WMF MS Windows Metafile - - Requires Batik
BMP BMP MS Windows and IBM OS/2 Device Independent Bitmap Native & Standard
CUR MS Windows Cursor Format - -
ICO MS Windows Icon Format -
HDR HDR Radiance High Dynamic Range RGBE Format - Standard
ICNS ICNS Apple Icon Image -
IFF IFF Commodore Amiga/Electronic Arts Interchange File Format Standard
JPEG JPEG Joint Photographers Expert Group Native & Standard
JPEG Lossless - Native & Standard
PCX PCX ZSoft Paintbrush Format - Standard
DCX Multi-page PCX fax document - Standard
PICT PICT Apple Mac Paint Picture Format - -
PNM PAM NetPBM Portable Any Map Standard
PBM NetPBM Portable Bit Map - Standard
PGM NetPBM Portable Grey Map - Standard
PPM NetPBM Portable Pix Map Standard
PFM Portable Float Map - Standard
PSD PSD Adobe Photoshop Document - Native & Standard
PSB Adobe Photoshop Large Document - Native & Standard
SGI SGI Silicon Graphics Image Format - Standard
TGA TGA Truevision TGA Image Format Standard
ThumbsDB Thumbs.db MS Windows Thumbs DB - - OLE2 Compound Document based format only
TIFF TIFF Aldus/Adobe Tagged Image File Format Native & Standard
BigTIFF - Native & Standard
WebP WebP Google WebP Format - Standard In progress
XWD XWD X11 Window Dump Format - Standard

Important note on using Batik: Please read The Apache™ XML Graphics Project - Security, and make sure you use version 1.14 or later.

Note that GIF, PNG and WBMP formats are already supported through the ImageIO API, using the JDK standard plugins. For BMP, JPEG, and TIFF formats the TwelveMonkeys plugins provides extended format support and additional features.

Basic usage

Most of the time, all you need to do is simply include the plugins in your project and write:

BufferedImage image = ImageIO.read(file);

This will load the first image of the file, entirely into memory.

The basic and simplest form of writing is:

if (!ImageIO.write(image, format, file)) {
   // Handle image not written case
}

This will write the entire image into a single file, using the default settings for the given format.

The plugins are discovered automatically at run time. See the FAQ for more info on how this mechanism works.

Advanced usage

If you need more control of read parameters and the reading process, the common idiom for reading is something like:

// Create input stream (in try-with-resource block to avoid leaks)
try (ImageInputStream input = ImageIO.createImageInputStream(file)) {
    // Get the reader
    Iterator<ImageReader> readers = ImageIO.getImageReaders(input);

    if (!readers.hasNext()) {
        throw new IllegalArgumentException("No reader for: " + file);
    }

    ImageReader reader = readers.next();

    try {
        reader.setInput(input);

        // Optionally, listen for read warnings, progress, etc.
        reader.addIIOReadWarningListener(...);
        reader.addIIOReadProgressListener(...);

        ImageReadParam param = reader.getDefaultReadParam();

        // Optionally, control read settings like sub sampling, source region or destination etc.
        param.setSourceSubsampling(...);
        param.setSourceRegion(...);
        param.setDestination(...);
        // ...

        // Finally read the image, using settings from param
        BufferedImage image = reader.read(0, param);

        // Optionally, read thumbnails, meta data, etc...
        int numThumbs = reader.getNumThumbnails(0);
        // ...
    }
    finally {
        // Dispose reader in finally block to avoid memory leaks
        reader.dispose();
    }
}

Query the reader for source image dimensions using reader.getWidth(n) and reader.getHeight(n) without reading the entire image into memory first.

It's also possible to read multiple images from the same file in a loop, using reader.getNumImages().

If you need more control of write parameters and the writing process, the common idiom for writing is something like:

// Get the writer
Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName(format);

if (!writers.hasNext()) {
    throw new IllegalArgumentException("No writer for: " + format);
}

ImageWriter writer = writers.next();

try {
    // Create output stream (in try-with-resource block to avoid leaks)
    try (ImageOutputStream output = ImageIO.createImageOutputStream(file)) {
        writer.setOutput(output);

        // Optionally, listen to progress, warnings, etc.

        ImageWriteParam param = writer.getDefaultWriteParam();

        // Optionally, control format specific settings of param (requires casting), or
        // control generic write settings like sub sampling, source region, output type etc.

        // Optionally, provide thumbnails and image/stream metadata
        writer.write(..., new IIOImage(..., image, ...), param);
    }
}
finally {
    // Dispose writer in finally block to avoid memory leaks
    writer.dispose();
}

For more advanced usage, and information on how to use the ImageIO API, I suggest you read the Java Image I/O API Guide from Oracle.

Adobe Clipping Path support

import com.twelvemonkeys.imageio.path.Paths;

...

try (ImageInputStream stream = ImageIO.createImageInputStream(new File("image_with_path.jpg")) {
    BufferedImage image = Paths.readClipped(stream);

    // Do something with the clipped image...
}

See Adobe Clipping Path support on the Wiki for more details and example code.

Using the ResampleOp

The library comes with a resampling (image resizing) operation, that contains many different algorithms to provide excellent results at reasonable speed.

import com.twelvemonkeys.image.ResampleOp;

...

BufferedImage input = ...; // Image to resample
int width, height = ...; // new width/height

BufferedImageOp resampler = new ResampleOp(width, height, ResampleOp.FILTER_LANCZOS); // A good default filter, see class documentation for more info
BufferedImage output = resampler.filter(input, null);

Using the DiffusionDither

The library comes with a dithering operation, that can be used to convert BufferedImages to IndexColorModel using Floyd-Steinberg error-diffusion dither.

import com.twelvemonkeys.image.DiffusionDither;

...

BufferedImage input = ...; // Image to dither

BufferedImageOp ditherer = new DiffusionDither();
BufferedImage output = ditherer.filter(input, null);

Building

Download the project (using Git):

$ git clone [email protected]:haraldk/TwelveMonkeys.git

This should create a folder named TwelveMonkeys in your current directory. Change directory to the TwelveMonkeys folder, and issue the command below to build.

Build the project (using Maven):

$ mvn package

Currently, the recommended JDK for making a build is Oracle JDK 8.x.

It's possible to build using OpenJDK, but some tests might fail due to some minor differences between the color management systems used. You will need to either disable the tests in question, or build without tests altogether.

Because the unit tests needs quite a bit of memory to run, you might have to set the environment variable MAVEN_OPTS to give the Java process that runs Maven more memory. I suggest something like -Xmx512m -XX:MaxPermSize=256m.

Optionally, you can install the project in your local Maven repository using:

$ mvn install

Installing

To install the plug-ins, either use Maven and add the necessary dependencies to your project, or manually add the needed JARs along with required dependencies in class-path.

The ImageIO registry and service lookup mechanism will make sure the plugins are available for use.

To verify that the JPEG plugin is installed and used at run-time, you could use the following code:

Iterator<ImageReader> readers = ImageIO.getImageReadersByFormatName("JPEG");
while (readers.hasNext()) {
    System.out.println("reader: " + readers.next());
}

The first line should print:

reader: com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader@somehash

Maven dependency example

To depend on the JPEG and TIFF plugin using Maven, add the following to your POM:

...
<dependencies>
    ...
    <dependency>
        <groupId>com.twelvemonkeys.imageio</groupId>
        <artifactId>imageio-jpeg</artifactId>
        <version>3.6.4</version>
    </dependency>
    <dependency>
        <groupId>com.twelvemonkeys.imageio</groupId>
        <artifactId>imageio-tiff</artifactId>
        <version>3.6.4</version>
    </dependency>

    <!--
    Optional dependency. Needed only if you deploy ImageIO plugins as part of a web app.
    Make sure you add the IIOProviderContextListener to your web.xml, see above.
    -->
    <dependency>
        <groupId>com.twelvemonkeys.servlet</groupId>
        <artifactId>servlet</artifactId>
        <version>3.6.4</version>
    </dependency>
</dependencies>

Manual dependency example

To depend on the JPEG and TIFF plugin in your IDE or program, add all of the following JARs to your class path:

twelvemonkeys-common-lang-3.6.4.jar
twelvemonkeys-common-io-3.6.4.jar
twelvemonkeys-common-image-3.6.4.jar
twelvemonkeys-imageio-core-3.6.4.jar
twelvemonkeys-imageio-metadata-3.6.4.jar
twelvemonkeys-imageio-jpeg-3.6.4.jar
twelvemonkeys-imageio-tiff-3.6.4.jar

Deploying the plugins in a web app

Because the ImageIO plugin registry (the IIORegistry) is "VM global", it doesn't by default work well with servlet contexts. This is especially evident if you load plugins from the WEB-INF/lib or classes folder. Unless you add ImageIO.scanForPlugins() somewhere in your code, the plugins might never be available at all.

In addition, servlet contexts dynamically loads and unloads classes (using a new class loader per context). If you restart your application, old classes will by default remain in memory forever (because the next time scanForPlugins is called, it's another ClassLoader that scans/loads classes, and thus they will be new instances in the registry). If a read is attempted using one of the remaining "old" readers, weird exceptions (like NullPointerExceptions when accessing static final initialized fields or NoClassDefFoundErrors for uninitialized inner classes) may occur.

To work around both the discovery problem and the resource leak, it is strongly recommended to use the IIOProviderContextListener that implements dynamic loading and unloading of ImageIO plugins for web applications.

<web-app ...>

...

    <listener>
        <display-name>ImageIO service provider loader/unloader</display-name>
        <listener-class>com.twelvemonkeys.servlet.image.IIOProviderContextListener</listener-class>
    </listener>

...

</web-app>

Loading plugins from WEB-INF/lib without the context listener installed is unsupported and will not work correctly.

The context listener has no dependencies to the TwelveMonkeys ImageIO plugins, and may be used with JAI ImageIO or other ImageIO plugins as well.

Another safe option, is to place the JAR files in the application server's shared or common lib folder.

Including the plugins in a "fat" JAR

The recommended way to use the plugins, is just to include the JARs as-is in your project, through a Maven dependency or similar. Re-packaging is not necessary to use the library, and not recommended.

However, if you like to create a "fat" JAR, or otherwise like to re-package the JARs for some reason, it's important to remember that automatic discovery of the plugins by ImageIO depends on the Service Provider Interface (SPI) mechanism. In short, each JAR contains a special folder, named META-INF/services containing one or more files, typically javax.imageio.spi.ImageReaderSpi and javax.imageio.spi.ImageWriterSpi. These files exist with the same name in every JAR, so if you simply unpack everything to a single folder or create a JAR, files will be overwritten and behavior be unspecified (most likely you will end up with a single plugin being installed).

The solution is to make sure all files with the same name, are merged to a single file, containing all the SPI information of each type. If using the Maven Shade plugin, you should use the ServicesResourceTransformer to properly merge these files. You may also want to use the ManifestResourceTransforme to get the correct vendor name, version info etc. Other "fat" JAR bundlers will probably have similar mechanisms to merge entries with the same name.

Links to prebuilt binaries

Latest version (3.6.4)

Requires Java 7 or later.

Common dependencies

ImageIO dependencies

ImageIO plugins

ImageIO plugins requiring 3rd party libs

Photoshop Path support for ImageIO

Servlet support

Old version (3.0.x)

Use this version for projects that requires Java 6 or need the JMagick support. Does not support Java 8 or later.

Common dependencies

ImageIO dependencies

ImageIO plugins

ImageIO plugins requiring 3rd party libs

Servlet support

License

This project is provided under the OSI approved BSD license:

Copyright (c) 2008-2020, Harald Kuhr
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

o Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

o Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

o Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

FAQ

q: How do I use it?

a: The easiest way is to build your own project using Maven, and just add dependencies to the specific plug-ins you need. If you don't use Maven, make sure you have all the necessary JARs in classpath. See the Install section above.

q: What changes do I have to make to my code in order to use the plug-ins?

a: The short answer is: None. For basic usage, like ImageIO.read(...) or ImageIO.getImageReaders(...), there is no need to change your code. Most of the functionality is available through standard ImageIO APIs, and great care has been taken not to introduce extra API where none is necessary.

Should you want to use very specific/advanced features of some of the formats, you might have to use specific APIs, like setting base URL for an SVG image that consists of multiple files, or controlling the output compression of a TIFF file.

q: How does it work?

a: The TwelveMonkeys ImageIO project contains plug-ins for ImageIO. ImageIO uses a service lookup mechanism, to discover plug-ins at runtime.

All you have have to do, is to make sure you have the TwelveMonkeys JARs in your classpath.

You can read more about the registry and the lookup mechanism in the IIORegistry API doc.

The fine print: The TwelveMonkeys service providers for JPEG, BMP and TIFF, overrides the onRegistration method, and utilizes the pairwise partial ordering mechanism of the IIOServiceRegistry to make sure it is installed before the Sun/Oracle provided JPEGImageReader and BMPImageReader, and the Apple provided TIFFImageReader on OS X, respectively. Using the pairwise ordering will not remove any functionality form these implementations, but in most cases you'll end up using the TwelveMonkeys plug-ins instead.

q: Why is there no support for common formats like GIF or PNG?

a: The short answer is simply that the built-in support in ImageIO for these formats are good enough as-is. If you are looking for better PNG write performance on Java 7 and 8, see JDK9 PNG Writer Backport.

q: What about JAI? Several of the formats are already supported by JAI.

a: While JAI (and jai-imageio in particular) have support for some of the same formats, JAI has some major issues. The most obvious being:

  • It's not actively developed. No issues has been fixed for years.
  • To get full format support, you need native libs. Native libs does not exist for several popular platforms/architectures, and further the native libs are not open source. Some environments may also prevent deployment of native libs, which brings us back to square one.

q: What about JMagick or IM4Java? Can't you just use what's already available?

a: While great libraries with a wide range of formats support, the ImageMagick-based libraries has some disadvantages compared to ImageIO.

  • No real stream support, these libraries only work with files.
  • No easy access to pixel data through standard Java2D/BufferedImage API.
  • Not a pure Java solution, requires system specific native libs.

We did it

Comments
  • Writing compressed multipage TIFF

    Writing compressed multipage TIFF

    There is either a bug or need for additional clarification with the tiff-plugin when writing multiple pages is combined with compression.

    https://gist.github.com/WowMuchName/23b80df8cb54917fac0b338f1e3ea245

    Expected:

    A tiff is created with two pages:

    image0

    image1

    Received

    A tiff with two pages:

    image0

    image1

    Additional information

    The pages after one seem always wrong. When using real images, they are not always completely black but always messed up with black bars all over the place. They are displayed like that in windows-image viewer and irfan view. Also reading the file-data back into java contains the same error after page one.

    When I remove the lines 34-35 (where group4 compression is set) the multitiff is okay. Using LZW instead of CCITT T.6 emitts a result which is also invalid and causes an exception when trying to read it in java.

    It seems that combining multitiff + compression is either not working correctly or there is need for additional documentation. In JAI from which we are migrating I can't recall ever needing anything apart from setCompressionMode and setCompressionType to achieve the desired compression for multitiffs. If additional steps are needed in twelvemonkeys an example, testcase or additional documentation which shows how to write multitiffs with compression would be helpfull.

    Confirmed bug Trouble-shooting 
    opened by WowMuchName 42
  • imageio-jpeg does not handle IIOMetaData

    imageio-jpeg does not handle IIOMetaData

    I'm currently trying to convert a CMYK jpeg to an RGB one while preserving its meta data. Then i recognized that JPEGImageReader.getImageMetadata(...) method always returns null.

    opened by marcuslinke 37
  • Extract Clipping Path from TIFF Image

    Extract Clipping Path from TIFF Image

    It would be very useful if your TIFF ImageIO plugin could also extract Clipping Paths that are embedded in the TIFF Header and return a Shape object or even the raw SVG. This Shape or SVG Markup could then be used to add an Alpha Channel when converting TIFFs to other formats that support an Alpha Channel - like PNGs.

    New feature 
    opened by jasonwpalmer 29
  • JPEG LOSSLESS

    JPEG LOSSLESS

    Hello Harald,

    I am looking for a pure java support for the decoding of images with JPEG LOSSLESS since several months now. I am developing an open source DICOM visualizing and analysis tool; some medical imaging devices have JPEG LOSSLESS as default export so Id really love to support this otherwise not very convenient format.

    I read that there are plans that the TwelveMonkey will support it. Is there any time plan yet? Or do you know of any alternatives how to handle it? Any help would be much appreciated.

    Best Greetings; Ingo

    New feature 
    opened by MrFeeze 24
  • Exceptions reading some SVG files and Batik

    Exceptions reading some SVG files and Batik

    First of all, I'm really happy with this 3.4.1 release, thank you for a great job! All the problems that I've encountered had been solved, except with some SVG files.

    Now, there is a very high chance that this is not a TwelveMonkey's problem, I bet it is an issue within Batik (and I do know that Batik does not support everything) or I'm doing something wrong (like missing some jar files), but I felt it was worth mentioning.

    The problem happens only with some SVG images, like the one at the wikipedia page "SVG exported from KOMPAS-Graphic".

    When I try to read this file, I get this:

    2018-09-17 09:49:50 FINE: null
    Enclosed Exception:
    The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: drawing-type). [@meew.FileManager getCurrentImage]
    javax.imageio.IIOException: null
    Enclosed Exception:
    The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: drawing-type).
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader.getWidth(SVGImageReader.java:232)
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader.read(SVGImageReader.java:131)
    	at javax.imageio.ImageReader.read(ImageReader.java:939)
    	at meew.FileManager.getCurrentImage(FileManager.java:2046)
    	...
    Caused by: org.apache.batik.transcoder.TranscoderException: null
    Enclosed Exception:
    The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: drawing-type).
    	at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:134)
    	at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader$Rasterizer.init(SVGImageReader.java:549)
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader$Rasterizer.getDefaultWidth(SVGImageReader.java:562)
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader.getWidth(SVGImageReader.java:229)
    	... 40 more
    Caused by: org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: drawing-type).
    	at org.apache.batik.dom.AbstractNode.createDOMException(AbstractNode.java:407)
    	at org.apache.batik.anim.dom.SVGDOMImplementation.createElementNS(SVGDOMImplementation.java:202)
    	at org.apache.batik.anim.dom.SVGOMDocument.createElementNS(SVGOMDocument.java:373)
    	at org.apache.batik.dom.util.SAXDocumentFactory.startElement(SAXDocumentFactory.java:651)
    	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    	at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:453)
    	at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:357)
    	at org.apache.batik.anim.dom.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:225)
    	at org.apache.batik.anim.dom.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:300)
    	at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:114)
    	... 44 more
    

    I can't find any info about this drawing-type tag. I edited the xml of the file to remove that tag to test it. The image is displayed exactly the same in Firefox, with or without the tag. When I try to load the image removing the <drawing-type>1</drawing-type>, the exception changes to:

    
    java.lang.NullPointerException
    	at org.apache.batik.css.engine.CSSEngine.parseStyleSheet(CSSEngine.java:1223)
    	at org.apache.batik.css.engine.CSSEngine.parseStyleSheet(CSSEngine.java:1204)
    	at org.apache.batik.anim.dom.SVGOMStyleElement.getCSSStyleSheet(SVGOMStyleElement.java:140)
    	at org.apache.batik.css.engine.CSSEngine.getStyleSheetNodes(CSSEngine.java:923)
    	at org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(CSSEngine.java:785)
    	at org.apache.batik.css.engine.CSSEngine.getComputedStyle(CSSEngine.java:867)
    	at org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:81)
    	at org.apache.batik.bridge.CSSUtilities.convertVisibility(CSSUtilities.java:578)
    	at org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(SVGSVGElementBridge.java:141)
    	at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76)
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader$Rasterizer.transcode(SVGImageReader.java:309)
    	at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
    	at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader$Rasterizer.init(SVGImageReader.java:549)
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader$Rasterizer.getDefaultWidth(SVGImageReader.java:562)
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader.getWidth(SVGImageReader.java:229)
    	at com.twelvemonkeys.imageio.plugins.svg.SVGImageReader.read(SVGImageReader.java:131)
    	at javax.imageio.ImageReader.read(ImageReader.java:939)
    	at meew.FileManager.getCurrentImage(FileManager.java:2046)
    	...
    

    Do you know anything about this? This also happened in the previous 3.3.2 version. I'm using Batik version 1.10 now but the problem happened in the 1.9 version as well. By the way, I saw in the TwelveMonkey's release notes that "Batik dependencies updated to 1.9", so is it safe if I use 1.10?

    Trouble-shooting 
    opened by j-p-sequeira 23
  • Could not initialize class com.twelvemonkeys.imageio.color.ColorSpaces

    Could not initialize class com.twelvemonkeys.imageio.color.ColorSpaces

    Ever since upgrading to 3.4, I keep getting sporadic exceptions during the initialization of our software. This is the stacktrace:

    Could not initialize class com.twelvemonkeys.imageio.color.ColorSpaces
    java.lang.ExceptionInInitializerError
            at com.twelvemonkeys.imageio.color.YCbCrConverter.buildYCCtoRGBtable(YCbCrConverter.java:57)
            at com.twelvemonkeys.imageio.color.YCbCrConverter.<clinit>(YCbCrConverter.java:77)
            at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.convertYCbCr2RGB(JPEGImageReader.java:1276)
            at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.readImageAsRasterAndReplaceColorProfile(JPEGImageReader.java:502)
            at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:388)
            at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1468)
            ...
    Caused by: java.lang.NullPointerException
            at java.desktop/sun.java2d.cmm.lcms.LCMS.getProfileSize(LCMS.java:67)
            at java.desktop/java.awt.color.ICC_Profile.getData(ICC_Profile.java:1332)
            at com.twelvemonkeys.imageio.color.ColorSpaces.<clinit>(ColorSpaces.java:105)
            ... 18 more
    

    This doesn't happen every time, it's pretty sporadic. Any ideas? I'm on Linux if that matters. Please tell me if you need any more information.

    Trouble-shooting 
    opened by boris-petrov 23
  • Release 3.0

    Release 3.0

    As far as I understood, support for CMYK-Jpegs will come with 3.0. This is the main reason I would really like to see a releas soon ;) Since I could not find a maven repo containing 3.0-SNAPSHOT, I will now have to build my own and deploy to our internal nexus...

    Task 
    opened by sne11ius 23
  • Tiff Image Rotation increases the size 6x times

    Tiff Image Rotation increases the size 6x times

    Hi,

    we are using twelve monkeys for rotating tiff images. However, we see that after rotation, image size increases 6x times.

    sample code: BufferedImage bi = ImageIO.read(new File("C:\builds\sample.tif"));
    AffineTransform at = new AffineTransform(); at.translate(-(bi.getWidth() - bi.getHeight()) / 2, (bi.getWidth() - bi.getHeight()) / 2); at.rotate(Math.toRadians(90),bi.getWidth()/2,bi.getHeight() / 2); AffineTransformOp opRotated = new AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR); BufferedImage img = opRotated.filter(bi, null); String str = "C:\builds\sample2.tif"; File file = new File(str); ImageIO.write(img,"TIFF",new FileOutputStream(file));

    Trouble-shooting 
    opened by Priyalks 21
  • SVG Image size problem

    SVG Image size problem

    Hello,

    First, thank for the update! The ICO write support is very welcome :)

    But, after updating from imageio-batik-3.4.2 to imageio-batik-3.5 I'm having problems resizing SVG images. Most likely, it is related to this update: When rescaling SVGs use the ViewBox, if defined, for default sizes

    Now to describe my problem: I do a bit of cheating to zoom SVG images. Every time the user changes the zoom in my viewer, I modify the XML data (width and height) and pass this new document to the reader to generate a new image. This way, the image is always zoomed with awesome SVG quality instead of using conventional raster zooming.

    No need to say, in 3.4.2 all worked 100%. This is what I do:

            NodeList svgNodes = svgXML.getElementsByTagName("svg");
            if (svgNodes != null && svgNodes.getLength() > 0) {
                Node node = svgNodes.item(0);
                if (node instanceof Element) {
                    String viewBox = ((Element) node).getAttribute("viewBox");
                    if (viewBox.isEmpty()) {
                        // If no view box is in the original, there will be problems.
                        // Set a default one.
                        ((Element) node).setAttribute("viewBox", "0 0 " + widthPX + " " + heightPX);
                    }
    
                    ((Element) node).setAttribute("width", String.valueOf(widthPX));
                    ((Element) node).setAttribute("height", String.valueOf(heightPX));
                    success = true;
                }
            }
    

    In 3.5, it all becomes messed up. I think 3.4.2 was actually correct and 3.5 is wrong, because if you open the images in browsers they will have the same size as in 3.4.2 (unless XML has no width/height specified in which the browser will have the size in relation to the available size inside the element but in my viewer I'll default it to 400px).

    I think you'll be able to see the problem if you create copy of your SVG and try to double the size of the image. In 3.5, it is impossible because it ignores width/height, you'll need to halve the viewport but then the image gets cut.

    I think the problem would be solved if you change the reader code to this (which makes much more sense to me):

                // get the 'width' and 'height' attributes of the SVG document
                Dimension2D docSize = ctx.getDocumentSize();
                if (docSize != null) {
                    defaultWidth = (float) docSize.getWidth();
                    defaultHeight = (float) docSize.getHeight();
                }
                else {
                    SVGSVGElement rootElement = svgDoc.getRootElement();
                    String viewBoxStr = rootElement.getAttributeNS(null, SVGConstants.SVG_VIEW_BOX_ATTRIBUTE);
                    if (viewBoxStr.length() != 0) {
                        float[] rect = ViewBox.parseViewBoxAttribute(rootElement, viewBoxStr, null);
                        defaultWidth = rect[2];
                        defaultHeight = rect[3];
                    }
                    else {
                        defaultWidth = 200; //maybe 400 is better (not too small/big)
                        defaultHeight = 200; //maybe 400 is better (not too small/big)
                    }
                }
    
    Trouble-shooting 
    opened by j-p-sequeira 20
  • EOF exception with Tiff Images on rotation

    EOF exception with Tiff Images on rotation

    Hi,

    If I read a Tiff image, rotate it and write and repeat this once again. Third time when I read the Tiff Image I get EOF Exception . I get this Exception with almost all compression types of Tiff.

    Is rotation doing something wrong or #306 will fix this issue as [well?]

                        ImageInputStream inputStream = ImageIO.createImageInputStream(listOfFiles[j]);
                        Iterator<ImageReader> iterator = ImageIO.getImageReaders(inputStream);
                        if (iterator == null || !iterator.hasNext()) {
                            throw new IOException("Image file format not supported");
                        }
                        reader = (ImageReader) iterator.next();
                        reader.setInput(inputStream);
                        int nbPages = reader.getNumImages(true);
                        List<BufferedImage> imageList = new ArrayList<BufferedImage>();
                        List<IIOMetadata> metadataList = new ArrayList<IIOMetadata>();
                        List<IIOImage> iioImages = new ArrayList<IIOImage>();
                        int angle;
                        String compressionType = null;
                        for (int i = 0; i < nbPages; i++) {
                            IIOImage ioimg = reader.readAll(i, null);
                            BufferedImage bi = (BufferedImage) ioimg.getRenderedImage();
                            IIOMetadata metadata = ioimg.getMetadata();
                            if (compressionType == null) {
                                IIOMetadataNode tree = (IIOMetadataNode) metadata.getAsTree(IIOMetadataFormatImpl.standardMetadataFormatName);
                                IIOMetadataNode compression = (IIOMetadataNode) tree.getElementsByTagName("CompressionTypeName").item(0);
                                compressionType = compression.getAttribute("value");
                            }
    
                            System.out.println(listOfFiles[j].getName() + " " + compressionType);
                            if (pageRotationMap.get(i + 1) != null) {
                                //rotate
                                angle = pageRotationMap.get(i + 1);
                                AffineTransform at = new AffineTransform();
                                if (angle == 90 || angle == 270)
                                    at.translate(-(bi.getWidth() - bi.getHeight()) / 2, (bi.getWidth() - bi.getHeight()) / 2);
                                at.rotate(Math.toRadians(angle), bi.getWidth() / 2, bi.getHeight() / 2);
                                AffineTransformOp opRotated = new AffineTransformOp(at,
                                        AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
                                bi = opRotated.filter(bi, null);
                            }
                            imageList.add(bi);
                            metadataList.add(metadata);
                            iioImages.add(ioimg);
                        }
                        reader.dispose();
                        Iterator writers = ImageIO.getImageWritersByFormatName("tiff");
                        imageWriter = (ImageWriter) writers.next();
                        ImageOutputStream ios = ImageIO.createImageOutputStream(new File("C:\\soft\\Tiff2\\" + listOfFiles[j].getName()));
                        imageWriter.setOutput(ios);
                        imageWriter.prepareWriteSequence(null);
                        for (int i = 0; i < imageList.size(); i++) {
                            if (compressionType.equalsIgnoreCase("Old JPEG") && !isGrayJPEG(metadataList.get(i))) {
                                ImageWriteParam param = imageWriter.getDefaultWriteParam();
                                param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
                                param.setCompressionType("JPEG");
                                imageWriter.writeToSequence(new IIOImage(imageList.get(i), null, null), param);
                            } else if (compressionType.equalsIgnoreCase("Old JPEG") || (compressionType.equalsIgnoreCase("JPEG") && isGrayJPEG(metadataList.get(i))) || compressionType.contains("CCITT") || compressionType.equalsIgnoreCase("PackBits")) {
                                ImageWriteParam param = imageWriter.getDefaultWriteParam();
                                param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
                                param.setCompressionType("LZW");
                                imageWriter.writeToSequence(new IIOImage(imageList.get(i), null, null), param);
                            } else
                                imageWriter.writeToSequence(new IIOImage(imageList.get(i), null, metadataList.get(i)), null);
                        }
                        imageWriter.endWriteSequence();
                        imageWriter.dispose();
                        System.out.println(Instant.now().toString());
                        ios.flush();
                        ios.close();
    
    Trouble-shooting 
    opened by Priyalks 17
  • TIFF PlanarConfiguration 2 (planar) mistaken for interleaved

    TIFF PlanarConfiguration 2 (planar) mistaken for interleaved

    Hi,

    We use your library in open source project OrbisGIS to read TIFF files. However there is a problem with a TIFF file.

    The TIFF file is successfully read, however it shows a greyscale image with duplicated image. May be the bands are merged together ?

    Here some info about the file

    identify -verbose /mnt/stock/raster/raster/Nantes_Ouest_lambert2.tif
    Image: /mnt/stock/raster/raster/Nantes_Ouest_lambert2.tif
      Format: TIFF (Tagged Image File Format)
      Mime type: image/tiff
      Class: DirectClass
      Geometry: 17115x30810+0+0
      Units: PixelsPerInch
      Type: TrueColor
      Base type: TrueColor
      Endianess: LSB
      Colorspace: sRGB
      Depth: 8-bit
      Channel depth:
        red: 8-bit
        green: 8-bit
        blue: 8-bit
      Channel statistics:
        Pixels: 527313150
        Red:
          min: 0 (0)
          max: 255 (1)
          mean: 86.9599 (0.341019)
          standard deviation: 88.8267 (0.34834)
          kurtosis: -1.50411
          skewness: 0.299257
        Green:
          min: 0 (0)
          max: 255 (1)
          mean: 37.1403 (0.145648)
          standard deviation: 60.5394 (0.23741)
          kurtosis: 4.01027
          skewness: 2.14245
        Blue:
          min: 0 (0)
          max: 255 (1)
          mean: 43.2769 (0.169713)
          standard deviation: 61.8433 (0.242523)
          kurtosis: 2.93259
          skewness: 1.84273
      Image statistics:
        Overall:
          min: 0 (0)
          max: 255 (1)
          mean: 55.7924 (0.218794)
          standard deviation: 71.6003 (0.280785)
          kurtosis: 0.820791
          skewness: 1.39108
      Rendering intent: Perceptual
      Gamma: 0.454545
      Chromaticity:
        red primary: (0.64,0.33)
        green primary: (0.3,0.6)
        blue primary: (0.15,0.06)
        white point: (0.3127,0.329)
      Background color: white
      Border color: srgb(223,223,223)
      Matte color: grey74
      Transparent color: black
      Interlace: None
      Intensity: Undefined
      Compose: Over
      Page geometry: 17115x30810+0+0
      Dispose: Undefined
      Iterations: 0
      Compression: None
      Orientation: TopLeft
      Properties:
        date:create: 2015-10-09T16:30:34+02:00
        date:modify: 2015-10-09T16:30:34+02:00
        signature: 75e5e167bcd0b3e19e55fc08def01eaf63ea175acd7f9eb81b193dddce8fb747
        tiff:endian: lsb
        tiff:photometric: RGB
        tiff:rows-per-strip: 1
      Artifacts:
        filename: /mnt/stock/raster/raster/Nantes_Ouest_lambert2.tif
        verbose: true
      Tainted: False
      Filesize: 1.5834GB
      Number pixels: 527.3M
      Pixels per second: 161.8MB
      User time: 3.260u
      Elapsed time: 0:04.259
      Version: ImageMagick 6.8.9-8 Q16 x86_64 2014-11-18 http://www.imagemagick.org
    

    What we get:

    http://imgur.com/VbCfDTo

    Confirmed bug 
    opened by nicolas-f 17
  • More universal SVG stream detection

    More universal SVG stream detection

    This is a suggestion for implementing universal SVG stream detection using a SAX parser that (setup will most likely be used for the final parsing, and):

    • Would handle any supported text encoding including UTF-16 and possible BOM

      Parser following F.1 Detection Without External Encoding Information would be able to handle EBCDIC code pages as well;

    • Handles possible namespace prefixes and matches the SVG namespace precisely.

    I haven't verified explicitly but the parsing is stopped at most at the root document element, and the performance should not be noticeably slower. As previously, uses possible DOCTYPE declaration as a speculative optimization:

    <!DOCTYPE svg ...>
    <!--
      - Lenghty comment block...
      -->
    <svg ...>
    

    Notable differences with the existing implementation include:

    • No longer accepted:

      <!--
        -- Malformed
        -->
      <svg xmlns="http://www.w3.org/2000/svg">
      
    • No longer accepted:

      <svg xmlns="http://www.w3.org/2023/fake">
      
    • Now is accepted:

      <!DOCTYPE ns:svg>
      <ns:svg xmlns:ns="http://www.w3.org/2000/svg">
      

    The following is wrongfully accepted as before:

    <!DOCTYPE svg>
    <svg xmlns="http://www.w3.org/2023/fake">
    

    I don't think it is necessary but the last one could be made more reliable by considering the DOCTYPE declaration only when the name doesn't match svg and doesn't end with :svg (definitely not an SVG), or when the name matches svg or ends with :svg and the public identifier matches -//W3C//DTD SVG 1.0//EN or -//W3C//DTD SVG 1.1//EN. If the DOCTYPE name is svg or ends with :svg, but the public identifier is unknown it could always fall back to looking at the root document element.

    opened by stanio 6
  • Support org.w3c.dom.Document input to SVGImageReader

    Support org.w3c.dom.Document input to SVGImageReader

    Use case: Allow reading an SVG source once, and tweaking its content in memory like changing viewBox, colors, and styles to produce multiple image variants in succession.

    Similar to: DynamicSvgOffscreen - Rendering a dynamic SVG document to an offscreen buffer (Batik HowTos)

    opened by stanio 2
  • Fail to generate PNG file from PSD when update 3.6.1 to 3.9.4

    Fail to generate PNG file from PSD when update 3.6.1 to 3.9.4

    Describe the bug When I use 3.9.4 latest version, fail to generate PNG file from specific PSD. But When I use 3.6.1 version, success to generate PNG file from that(failed with 3.9.4). If you need more infomation, tell me freely.

    Version information

    1. The version of the TwelveMonkeys ImageIO library in use. 3.9.4

    2. The exact output of java --version (or java -version for older Java releases).

    openjdk version "11.0.6" 2020-01-14
    OpenJDK Runtime Environment 18.9 (build 11.0.6+10)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10, mixed mode)
    
    
    1. Extra information about OS version, server version, standalone program or web application packaging, executable wrapper, etc. Please state exact version numbers where applicable. CentOS Linux 7 (Core)

    To Reproduce

    1. Open PSD file in java code
    2. make BufferedImage from PSD file
    

    Expected behavior generate PNG file from PSD normally

    Example code If you need, i will write unit test code.

    File psdFile = new File("src/main/resources/sample.psd");
    InputStream targetStream = FileUtils.openInputStream(psdFile);
    BufferedImage image = ImageIO.read(inputStream);
    ImageIO.write(image, "PNG", new CustomByteArrayOutputStream());
    

    Sample file(s) I cannot attached, because it's customer's.

    Stak trace

    java.util.EmptyStackException: null
      at java.base/java.util.Stack.peek(Stack.java:102)
      at java.base/java.util.Stack.pop(Stack.java:84)
      at com.twelvemonkeys.imageio.plugins.psd.PSDImageReader.readLayerInfo(PSDImageReader.java:1051)
      at com.twelvemonkeys.imageio.plugins.psd.PSDImageReader.readLayerAndMaskInfo(PSDImageReader.java:920)
      at com.twelvemonkeys.imageio.plugins.psd.PSDImageReader.getNumImages(PSDImageReader.java:1220)
      at com.twelvemonkeys.imageio.ImageReaderBase.checkBounds(ImageReaderBase.java:190)
      at com.twelvemonkeys.imageio.plugins.psd.PSDImageReader.read(PSDImageReader.java:368)
      at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1468)
      at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1363)
    

    Additional context

    Reported bug 
    opened by dsboo 1
  • Transparency in the BMP image format

    Transparency in the BMP image format

    Hello, is it possible to store a BufferedImage with transparency in the BMP image format? With 32 bits per pixel this information should be storable. I also don't need a fine gradation of transparency but only is transparent or not.

    I need to save it in a directly modifiable format because the image is too large for the memory of the creating program and the program assembles the image piece by piece.

    Trouble-shooting 
    opened by Skillkiller 4
  • Expose webp animation frame data

    Expose webp animation frame data

    There is no way to obtain animated webp frame data, such as duration of the frame. This is necessary to be able to read webp and show animation with correct speed. Currently, WebpImageReader does not expose any information about animation duration. This information is already read and stored in WebpImageReader.header: List<AnimationFrame>, however it is not publicly obtainable.

    I have managed to obtain this information with reflection and read all frames with correct duration times and display correct animation in a JavaFX Application (using JavaFX Timeline). The pseudocode regarding the reader is:

                (reader.minIndex..Int.MAX_VALUE).asSequence().map { imageIndex ->
                         val (iW, iH) = reader.getWidth(imageIndex) to reader.getHeight(imageIndex)
                         val frame = getFieldValue<List<Any>>(reader, "frames")[imageIndex]
                         val duration = getFieldValue<Int>(frame, "duration")
                         val irp: ImageReadParameters = ...
                         return ImageFrameDto(duration, reader.read(imageIndex, irp)) }
                  }
    

    The methods reader.getWidth and reader.getHeight delegate internally to frames[imageIndex].width and frames[imageIndex].height respectively. Similarly, a method reader.getDuration(i: Int) could be added, which is the requested feature here. This would allow clients to avoid using reflection.

    The problem however is also that WebpImageReader is not public class and as such, no non-inherited API could be used by clients. In my opinion, making the class public and adding an API is proper solution, as subclasses providing specific APIs is fine design. However, I feel, the Reader classes in imageio were purposefully hidden, so I would like to know what the proper strategy is here.

    Another concern is how the new methods would work if the image is not animated. Either return some synthetic value or throw exception.

    I can put in necessary work and create PR for this. I'd like to hear from the authors first though, so to avoid implementing a dead end solution.

    MetadataReader consistency

    In addition, WebPMetadataReader seems inconsistent with GifMetadataReader, which returns directories containing all gif Control tags, with each frame's animation duration. Webp metadata does not contain any of this information, though it does contain flag whether it is animated. The code to print this data is:

             ImageMetadataReader.readMetadata(f)
                .directories.asSequence()
                .filter { it.name!="File" }
                .flatMap { it.tags }
                .joinToString("\n") { "${it.directoryName} > ${it.tagName}: ${it.description}" }
    

    Checking if image is animated

    For completeness' sake, here is a way to check whether gif image is animated (maybe there is better way):

    GifMetadataReader.readMetadata(f).getDirectoriesOfType(GifControlDirectory.class).size()>1
    
    WebpMetadataReader.readMetadata(f).getFirstDirectoryOfType(WebpDirectory.class).getBoolean(WebpDirectory.TAG_IS_ANIMATION)
    

    I do not like reading all image metadata for this check - it seems like a heavy operation. Particularly for webp, there is a better way to check this flag, but it requires custom reading of the file's input stream as shown here https://stackoverflow.com/a/73170213. I feel like there is missing API here - WebpMetadataReader.readFirstDirectoryOfType(file: File, directoryType: Class<?>), which would be as efficient as the SO answer, that only reads what's specified. I'd like to hear author's opinion about this.

    Ideally, ImageReader would be able to return animation aspect of the loaded image, however since BufferedImage and the like have no proeprties/userData, there is little that can be done here. This is exactly why reading animation frames as BufferedImages does not provide the duration information - there is nowhere to store it.

    New feature 
    opened by sghpjuikit 5
Releases(twelvemonkeys-3.9.4)
  • twelvemonkeys-3.9.4(Nov 22, 2022)

    TwelveMonkeys ImageIO 3.9.4 release notes

    This is a bug fix release.

    #712 Core: Fix possible OOM situation in new stream implementations #708 PSD: No longer emit warning for '8B64' (64 bit/long) resources #713 PSD: Fixed broken uncompressed reading from streams with unknown length #714 PNM: Added support for writing TYPE_INT_* images #710/715 SVG: Upgraded Batik dependencies to 1.16

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.9.3(Oct 20, 2022)

  • twelvemonkeys-3.9.2(Oct 20, 2022)

    TwelveMonkeys ImageIO 3.9.2 release notes

    This is a bug fix release.

    #704 WebP: Fixes a serious performance issue in the lossless WebP decoding.

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.9.1(Oct 20, 2022)

  • twelvemonkeys-3.9.0(Oct 15, 2022)

    TwelveMonkeys ImageIO 3.9.0 release notes

    The TwelveMonkeys ImageIO version 3.9.0 is ready for release.

    Thanks to everyone who has committed code, patches, filed bug reports or otherwise contributed to the development of this version!

    Special thanks to the following contributors:

    • @Simon04090 for contributing the major parts of WebP lossless decoding
    • @younseunghyun for PSD group layer support
    • @Schmidor for several TIFF fixes and improvements
    • @KoenDG for TGA bugfix, documentation and other improvements
    • @astappiev for the Jakarta EE module generation
    • @gotson for the new Github Actions build

    What's new?

    Improved WebP read support. We finally support WebP lossless, alpha and more of the animation (ANIM/ANMF) spec. All still images should now be correctly read.

    Major overhaul of the metadata generation, for more correct and consistent metadata. Fixed a lot of minor issues in the "standard format" metadata.

    Generally improved stream performance.

    Support for the new Jakarta EE namespace in the servlet module. Now outputs a separate JAR for Jakarta EE, to allow usage in a Jakarta EE environment.

    The following bugs/issues are fixed in this release:

    #687 Common: Stream performance regressions #691 Common: Stream performance regressions #703 Common: Workaround for 32 bit issue in ImageTypeSpecifier #702 WebP: Fixed NPE while reading an WebP animation without alpha #700 Batik: Upgraded Batik dependencies and recommended version to 1.15 #xxx Common: JDK 18 support in build #629 WebP: lossless + alpha read support #694 BMP: Fixed subsampling for 24 bit/pixel case in reader #684 SVG: Fixed render size issues in reader #675 PSD: 16/32 bit layer read support #681 TIFF: Fixed little-endian "packed" USHORT reading #683 TIFF: Fixed stripByteCounts computation for uncompressed data in writer #682 TIFF: Lab w/alpha support #680 TGA: Now reads attribute bits with no extension area as alpha #678 TIFF: Read support for YCbCr Planar without subsampling #679 TIFF: Read support for YCbCr Planar with subsampling #677 TIFF: Fixed integer overflow in writer #672 WebP: Reader now supports unknown stream lengths #666 TIFF: Read support for RGB 2/4 bit per sample #667 TIFF: Fixed ImageOrientation metadata in mergeTree #660 Common: Farewell, Lena (removed sample images) #xxx: IFF: TVPP and DEEP read support #xxx: IFF: RGB8 read support #658: TGA: Reader now allows extension area of size 0 #657: TIFF: Better detection of compression type in RLE if leading EOL is missing #624 TGA: Fixed for pixeldepth-16 issue #656: TIFF: Support writing String array as ASCII in metadata #655 JPEG: Added force raster conversion switch #559 JPEG: Fixed IIOInvalidTreeException: Invalid DHT node #652 TIFF: Better corruption guards to avoid OOME #648 PSD: Support for reading Group Layer #651 TIFF: Fixed ExtraSamplesColorModel to create correct length elements array #650 Common: Allow usage in OSGi environment. #647 Common: Upgrade commons-io dependencies to 2.11.0 #646 WebP: Now recognizes VP8 encoded images in VP8X format #636: Servlet: Create Jakarta EE package on build

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.8.3(Aug 19, 2022)

    TwelveMonkeys ImageIO 3.8.3 release notes

    This is a bug fix release.

    What's new?

    Mostly minor new features for TIFF and other bug fixes.

    The following bugs/issues are fixed in this release:

    #672 WebP: Now supports unknown stream lengths #677 TIFF: Fixed integer overflow for large images when writing #678 TIFF: Support for YCbCr planar images in reader #679 TIFF: Support for YCbCr planar with subsampling in reader #680 TGA: Now reads attribute bits with no extension area as alpha #682 TIFF: Lab + Alpha support in reader #683 TIFF: Fixed stripByteCounts computation for uncompressed data when writing #681 TIFF: Fix for little endian "packed" USHORT types in reader #675 PSD: 16/32 bit multilayer support #684 SVG: Fixed render size issue #693 TIFF: DiscreteAlphaIndexColorModel now returns the correct number of components #694 BMP: Fixed subsampling for 24 bit case

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.8.2(Feb 22, 2022)

    TwelveMonkeys ImageIO 3.8.2 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #656: TIFF plugin now supports writing ASCII array (multiple strings) #652: TIFF plugin avoids OOME for values larger than file size palette depth != 0 #657: TIFF plugin now better detects missing EOLs #559: JPEG plugin now handles more than 4 DHT nodes #655: JPEG plugin now has a "force raster conversion" switch #648: PSD plugin now supports Group Layers #658: TGA plugin now recognizes "true color" images with valid palette depth != 0 #658: TGA plugin now allows extension area of size 0 #663: IFF plugin now has support for IFF RGB8 (Impulse Imagine/TurboSilver) #664: IFF plugin now has support for IFF DEEP (TVPaint) #665: PNM plugin now supports files without line breaks between width/height/max-value

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.8.1(Dec 27, 2021)

    TwelveMonkeys ImageIO 3.8.1 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #651: Fix ExtraSamplesColorModel equals + hashcode to behave nicely with ImageTypeSpecifier comparison #651: Fix ExtraSamplesColorModel to create correct length elements array #650: Allow usage in OSGi environment (again) #646: Spi now recognizes VP8 encoded images in VP8X ("extended format") #636: Create Jakarta servlet package on build

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.8.0(Dec 12, 2021)

    TwelveMonkeys ImageIO 3.8.0 release notes

    The TwelveMonkeys ImageIO version 3.8.0 is ready for release.

    Thanks to everyone who has committed code, patches, filed bug reports or otherwise contributed to the development of this version!

    A big thank you to my new sponsors! ❤️

    What's new?

    Rewritten ICC color profile activation, to better workaround JDK bug.

    Improved WebP read support. Fixed problems with incorrect YCbCr to RGB conversion (now uses rec 601), ICC profile issues and added preliminary animation (ANIM/ANMF) support.

    Initial PSD write support.

    Initial BigTIFF write support.

    The following bugs/issues are fixed in this release:

    #631: New way of forcing profile activation + guarding all invocations of ICC_Profile.getInstance() #645: AAIOBE in CCITTFaxDecoderStream now wrapped in IOException ----: Avoid fetching external resources in XMPReader #629: Preliminary WebP animation (ANIM/ANMF) support #628: TIFF metadata fix, now always outputs denominator for rationals. #626: TIFF CCITT detection only once per IFD, handle fillOrder for all compressions #623: TGAImageReader, PCXImageReader and SGIImageReader now return more standard image types as default, for better AffineTransformOp compatibility. #624: Added metadata support for 16 bit USHORT gray TGA images #621: Don't add ICC profile for default gray TIFF images #617: BigTIFF write support #483 Initial PSD Write support #616: Remove dependency on old xmlgraphics-commons (no longer needed) #619: Fix WebP Y'CbCr->RGB conversion (now uses rec 601) #609 Fixed ICC Profile handling in WebP. #579: Deeper EOL search in the CCITT stream #606: Workaround for broken JDK WBMPImageReader ----: Deprecated old servlet classes (for removal in later version)

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.7.1(Dec 12, 2021)

    TwelveMonkeys ImageIO 3.7.1 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #631: New way of forcing profile activation + guarding all invocations of ICC_Profile.getInstance() #645: AAIOBE in CCITTFaxDecoderStream now wrapped in IOException ----: Avoid fetching external resources in XMPReader #628: TIFF metadata fix, now always outputs denominator for rationals #626: TIFF CCITT detection only once per IFD, handle fillOrder for all compressions #623: TGAImageReader, PCXImageReader and SGIImageReader now return more standard image types as default, for better AffineTransformOp compatibility. #624: Added metadata support for 16 bit USHORT gray TGA images #621: Don't add ICC profile for default gray TIFF images #616: Remove dependency on old xmlgraphics-commons (no longer needed) #619: Fix WebP Y'CbCr->RGB conversion (now uses rec 601) #609 Fixed ICC Profile handling in WebP. #579: Deeper EOL search in the CCITT stream #606: Workaround for broken JDK WBMPImageReader ----: Deprecated old servlet classes (for removal in later version)

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.7.0(Apr 24, 2021)

    TwelveMonkeys ImageIO 3.7.0 release notes

    The TwelveMonkeys ImageIO version 3.7.0 is ready for release.

    Thanks to everyone who has committed code, patches, filed bug reports or otherwise contributed to the development of this version!

    What's new?

    Initial WebP read support. Currently supports the basic compressed format, but not the lossless or compressed with lossless alpha. This work is still in progress. Let me know if you need it, and consider supporting the project if you do!

    Improvements to the JPEG and TIFF plugins, and interoperability tests for JAI and JEP-262.

    Rewrite of JPEG thumbnail handling, to be more efficient and more lenient about malformed thumbnails (warnings instead of exceptions), to allow readAll to complete, even if the thumbnail is broken.

    Read support for XWD and PNTG legacy formats.

    This version adds initial support for JPMS modules, via Automatic-Module-Name in JAR manifest. The module naming will be used in the 4.0 release, which will also require/support more recent Java versions and use JPMS modules. Feedback and reports on this feature is highly appreciated.

    The following bugs/issues are fixed in this release:

    ---- Added .0 to version for SemVer in first minor release #573 JPEG: JPEGImageReader.getRawType now always returns non-null (as per the new spec) #443 Automatic-Module-Name in each JARs MANIFEST.MF #362 JPEG: metadata names in ProviderInfo #532 TGA: Write support for RLE compression #600 TimeoutMap now longer gets Long.MAX_VALUE as next expiry time if map is empty when removeExpiredEntries() is invoked. #584 JPEG/TIFF: JAI/JEP-262 interop + testing #417 TIFF: Support for reading 16 bit half precision floating point #554, #417 TIFF: Relaxed custom metadata restrictions, allows writing most tags ---- PICT: Standard metadata support #588 Clipping path from JPEG with multiple APP13 segments #582 JPEG: Fix for missing/malformed thumbnails, now only issues warning

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.6.4(Mar 8, 2021)

    TwelveMonkeys ImageIO 3.6.4 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #595 Fix infinite loops in corrupted JPEGs

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.6.3(Feb 26, 2021)

    TwelveMonkeys ImageIO 3.6.3 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #591 Upgraded the Apache Batik library from 1.12 to 1.14 due to fixed CVEs. #593 More robust JPEG thumbnail reading #593 EXIFUtilities.readWithOrientation no longer reads thumbnails for better performance and compatibility. #592 Fixed SGI source subsampling #588 Clipping path from JPEG with multiple APP13 segments now supported

    Various other minor fixes and enhancements.

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.6.2(Jan 23, 2021)

    TwelveMonkeys ImageIO 3.6.2 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #582 Fix for missing Exif thumbnail, now only issues warning #579 More reliable CCITT compression type detection #577 Fix TGA subsampling + bonus metadata fix and palette conversion Performance optimizations and fixes to BufferedImageInputStream

    Various other minor fixes and enhancements.

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.6.1(Nov 20, 2020)

    TwelveMonkeys ImageIO 3.6.1 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #466 TGA Extension fix for files written by 3DS Max #556 PICTImageReaderSpi no longer claims to decode known formats #330 BMPImageReader and ICOImageReader now throw IIOException instead of various RuntimeExceptions #574 Fix for possible OOME situation caused by bad Exif segments in JPEG

    Various other minor fixes and enhancements.

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.6(Jul 10, 2020)

    TwelveMonkeys ImageIO 3.6 release notes

    The TwelveMonkeys ImageIO version 3.6 is ready for release.

    Thanks to everyone who has committed code, patches, filed bug reports or otherwise contributed to the development of this version!

    What's new?

    JPEG metadata handling is now completely rewritten, and we now use our own metadata implementation (based on the current JPEG lossless implementation). The new implementation should be fully compatible with the existing "javax_imageio_jpeg_image_1.0" format, but allows for fixing a few long standing bugs and exposing more data.

    EXIF image orientation is now exposed in the standard metadata format ("javax_imageio_1.0") from the JPEGImageReader. The value can be found in the //Dimension/ImageOrientation@value attribute. An extra set of tools for automatically reading and applying EXIF orientation is available in the contrib module (EXIFUtilites class and the Orientation enum).

    The following bugs/issues are fixed in this release:

    #520 TIFFImageMetadata.setFromTree(...) now correctly handles TIFF.TAG_BITS_PER_SAMPLE and others. #547 BMPImageWriter is now registered behind other writers, and only claims to write TYPE_4BYTE_ABGR (other formats are left to the standard writer). #550 Adobe path points outside the [0...1] range no longer causes IllegalArgumentException. Now more correctly allows the full [-16...16] range. #108 Finally fixed the long standing issue of some YCbCr encoded JPEGs having ColorSpaceType "RGB" in the standard metadata

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.5(Jan 24, 2020)

    TwelveMonkeys ImageIO 3.5 release notes

    The TwelveMonkeys ImageIO version 3.5 is ready for release.

    Thanks to everyone who has committed code, patches, filed bug reports or otherwise contributed to the development of this version!

    What's new?

    Support for writing Adobe Photoshop clipping path embedded in JPEG and TIFF formats, through the Paths API (#490).

    Also worth mentioning is we now have basic write support for the Truevision TGA format (#379), as well as basic write support for Apple Icon (ICNS) and MS Window Icon (ICO) icon formats (#83 and #82 respectively).

    The following bugs/issues are fixed in this release:

    #514 Fixes invalid StripByteCounts in large TIFF files, due to integer overflow. #455 TIFF PhotometricInterpretation is no longer inverted for WhiteIsZero when ICC profile is present. #438 Fixed a resource leak in CompoundDocument when reading from File or InputStream inputs. #437 Fix for Could not initialize class com.twelvemonkeys.imageio.color.ColorSpaces. #412, #416 TIFFImageWriter now copies most fields from the metadata to the output. #398 Better exception message when BufferedImage size > Integer.MAX_VALUE

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.4.3(Jan 9, 2020)

    TwelveMonkeys ImageIO 3.4.3 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #493 Fixed subsampling for TIFF < 8 bit samples, no longer throws ArrayIndexOutOfBoundsException #501 Fix for reading BMP and other files with TYPE_USHORT_555/565_RGB, ColorModel now has 16 bits #510 Fix for possible hang situation in corrupted/malicious JPEG files

    In addition, any dependencies for Log4J has been removed (previous releases of the TwelveMonkeys servlet module contained an unused provided dependency on Log4J 1.2.17). See Deserialization of Untrusted Data in Log4j for details on why this was removed.

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.4.2(Aug 12, 2019)

    TwelveMonkeys ImageIO 3.4.2 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #492 TIFFReader: ASCII fields are incorrectly parsed as single string #489 Unexpected End of PackBits Stream for some TIFF files #488 ArrayIndexOutOfBoundsException in getEmbeddedICCProfile #477 Cyclic directory references in EXIF data cause StackOverflowErrors #469 Out of memory while reading Exif data from JPEG file #474 java.awt.color.CMMException: Can not access specified profile #455 TIFF with PHOTOMETRIC_WHITE_IS_ZERO and ICC Profile is inverted #398 Better exception message when BufferedImage size > Integer.MAX #449 TIFFImageReader: Ignore bogus StripByteCounts entry with value 0 #475 Fix support for writing TIFF > 2 GB #473 Fix for ColorMap (Indexed) TIFF with non-alpha ExtraSamples #442 SVG BaseURI issue fix #438 CompoundDocument file descriptor fix

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.4.1(Sep 8, 2018)

    TwelveMonkeys ImageIO 3.4.1 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #439 Unclear exception message when passing TIFF image metadata as stream metadata. #437 Fixes class init problem in ColorSpaces class caused by JRE (NullPointerException from CMM) bug.

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.4(Aug 18, 2018)

    TwelveMonkeys ImageIO 3.4 release notes

    The TwelveMonkeys ImageIO version 3.4 is finally ready for release. With an extra emphasis on finally this time.

    Thanks to everyone who has committed code, patches, filed bug reports or otherwise contributed to the development of this version!

    Especially, a big thank you to Oliver Schmidtmer (@Schmidor) for providing numerous bug fixes for the TIFF plugin, Ivan Khaldeev (@ikhaldeev) for improvements to the TIFF plugin, James Dudley (@blueinblue) for his persistence in finding the bug that caused the multipage compressed TIFF writing offset issue. :-)

    What's new?

    New features:

    #25 JPEGImageWriter can now finally write CMYK JPEG files directly from CMYK BufferedImages (CMYK for now, YCCK will come soon) #360 JPEGImageReader "JPEG-LOSSLESS" and "jpeg-lossless" are now recognised format names #343 JPEGImageReader now supports reading regions of large JPEGs (w * h > Integer.MAX_VALUE)

    #342 TIFFImageReader now recognises and reads the BigTIFF format #307 TIFFImageReader now recognises and reads custom PIXTIFF ZIP compression #304 TIFFImageReader now reads JPEG Lossless compressed data #280 TIFFImageReader now reads 6, 10, 12, 14 and 24 bits per sample data #317 #429 #432 TIFFImageReader now correctly interprets images with multiple ExtraSamples and non-alpha samples #287 TIFFImageReader now supports Palette image data with a discrete alpha channel #290 TIFFImageWriter now supports controlling byte order through stream metadata #358 TIFFImageWriter now passes compression quality setting to JPEGImageWriter when writing TIFF with JPEG compression

    #383 PSDImageReader now supports multiple extra channels/masks

    Bugs fixed:

    #324 TIFFImageReader now supports PackBits/LZW/Deflate with FillOrder 2 #404 #406 TIFFImageReader now has more compatible color space interpretation for JPEG (same as libJPEG) #300 TIFFImageReader now tries to read JPEG data, even if the JPEG metadata is "inconsistent" #334 #401 TIFFImageWriter now correctly writes compressed multipage TIFFs #313 TIFFImageWriter now correctly writes PhotometricInterpretation GRAY for GRAY JPEG data #312 #314 TIFFImageWriter now correctly supports SHORT or LONG values in the input meta data #397 TIFFImageMetadata now has correct attribute "name" for ColorSpaceType, was "value" #430 TIFFUtilities now supports merging of TIFF Pages with Sub-IFDs

    #202 JPEGImageReader now supports multiple JPEG streams in a single file #399 JPEGImageReader now has more compatible color space interpretation (same as libJPEG) #433 JPEGImageReader now correctly uses the current stream position #329 JPEGImageReader now has better handling of corrupt JPEG data #323 JPEGImageReader now tries to resolve invalid component IDs SOS segment #326 JPEGImageReader now reads JFIF JPEG with non-spec grayscale thumbnails #274 JPEGImageReader now correctly downsamples multiple DQTs from 16 to 8 bit #294 JPEGImageReader is now lenient about APPn markers without identifiers #297 JPEGLosslessDecoder now decodes images containing only AC tables

    #403 PSDImageReader now supports MeSa, PHUT, AgHg and DCSR Photoshop Image Resources #350 PSDMetadata now includes Horizontal-/VerticalPixelSize in standard Dimension node

    #400 PCXImageReader now has better handling of PCX monochrome color

    #419 PICTImageReader has a fix for a rounding bug, that caused images with missing rows and columns Bug #431 PICImageReaderSpi now correctly has an extra mark to match the reset call in the finally block

    #414 BufferedImageInputStream has a fix an issue when reading multi-byte entities on a buffer boundary #393 Better validation of corrupt ICC profile data in ImageReader implementations to avoid OutOfMemoryError #421 ColorSpaces CS_GENERIC_CMYK profile loaded from path has different headers during lifetime

    Other improvements/enhancements:

    #435 Batik dependencies updated to 1.9 #204 Exif metadata module refactored to a TIFF and Exif module #378 ColorSpaces getColorSpace now enforces correct colorspace type #405 Improved OSGi compatibility

    Thank you for your patience!

    We did it.

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.3.2(Feb 2, 2017)

    TwelveMonkeys ImageIO 3.3.2 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #306 TIFF: Fixed LZW write issue for < 8 bit/pixels #307 TIFF: Added support for PIXTIFF ZIP compression (50013) #312 TIFF: Fixed ClassCastException when re-writing compressed images (metadata) #314 TIFF: Fixed ClassCastException when re-writing compressed images (metadata) #313 TIFF: Fixed incorrect YCbCr photometric when writing grayscale JPEG compressed images #300 TIFF: Fix for Old-style-JPEG "Inconsistent metadata read from stream" issue (metadata) #297 JPEG: JPEGLossless now correctly supports images with multiple DC tables

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.3.1(Nov 29, 2016)

    TwelveMonkeys ImageIO 3.3.1 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #294 Fixed regression: Can now read JPEGs with APPn markers without null-terminated identifier #274 Fixed "Bogus marker length" issue when downscaling JPEG DQT from 16 to 8 bit

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.3(Nov 3, 2016)

    TwelveMonkeys ImageIO 3.3 release notes

    The TwelveMonkeys ImageIO version 3.3 is finally ready for release.

    Thanks to everyone who has committed code, patches, filed bug reports or otherwise contributed to the development of this version!

    Especially, a big thank you to Oliver Schmidtmer (@Schmidor) for providing numerous bug fixes for the TIFF plugin, and Herman Kroll (@HermannKroll) for integrating the JPEG Lossles code and its original author Helmut Dersch for kindly providing his JPEG code under BSD license.

    What's new?

    New features:

    #182 JPEG Lossless support. The library now has support for the most common bit depths of JPEG Lossless through the JPEGImageReader. #234 Raw Lossles Raster reading support through the JPEGImageReader

    Other improvements/enhancements:

    #212 TIFFImageReader: Subsampling is incorrect #268 TIFFImageReader: Reading with source region is broken for JPEG-in-TIFF raster case #272 LZWDecoder - IndexOutOfBoundsException when reading some files #282 TIFFReader EOFException when reading LZW RGB image #228 TIFFImageWriter does not correctly write images with "sampleModelTranslate" #241 TIFF: read after save fails with EOFException #229 TIFFImageWriter writes uncompressed files with incorrect "StripByteCounts" field #257 TIFFImageWriter: Unreadable LZW #253 TIFFImageReader: JPEG/YCbCr doc from Xerox scanner get inverted colors #267 TIFFImageReader: Monochrome image with grayscale profile #265 TIFFImageReader: Invalid JPEG file structure: missing SOS marker #260 Typo in TIFFProviderInfo - class package should read as com.twelvemkonkeys.imageio.plugins.tiff.TIFFImageWriterSpi #254 NPE reading TIFF Metadata when BitsPerSample not set #237 ArrayIndexOutOfBoundsException when reading G4 compressed TIFF file #232 TIFF EOFException #233 Tiff reader/writer corrupts image data. #220 Incorrect default for PlanarConfiguration in TIFFImageReader

    #276 JPEG Metadata Cleaner doesn't split DHT correctly #269 Issue with loading CMYK jpeg as BufferedImage with CMYK color model #266 NPE when reading empty file

    #285 BMPImageReader.getImageMetadata throws exception for files with incorrect header

    #214 PSDImageReader: Long layernames are not read New feature Trouble-shooting #248 PSDReader loads wrong band indicies in grayscale psd files with backgrounds. #244 PSDReader incorrectly uses grayscale ICCProfile with a grayscale background.

    #190 Support for Batik 1.8 #191 Support SVG files without XML declaration

    #256 ImageTypeSpecifiers needs special case for packed 8 and 16 bit types #258 Typo in provider info, spis etc : "twelvemkonkeys" #275 Infinite loop while getting ImageReaders #249 ImageUtilTestCase fails with 8u60+ #261 Extended AffineTransformOp for a Graphics2D fallback on filter-method #213 Add license to pom file New feature Task

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.2.1(Dec 11, 2015)

    TwelveMonkeys ImageIO 3.2.1 release notes

    This is a bug fix release.

    Note also that the Batik dependencies are updated from 1.6 to a more official 1.6.1, because of a security issue in older version of Batik. The next major release (3.3) will use Batik 1.8.

    What's new?

    The following bugs/issues are fixed in this release:

    #188 Fixed an issue with long runlengths in CCITTFax writing #191 Support for SVG files without XML declaration Updated versions and fixed Batik dependencies for 1.6.1 Updated README with info on Batik versions. #195 ArrayIndexOutOfBoundsException for ResampleOp in certain cases

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.2(Nov 1, 2015)

    TwelveMonkeys ImageIO 3.2 release notes

    The TwelveMonkeys ImageIO version 3.2 is finally ready for release.

    Thanks to everyone who has committed code, patches, filed bug reports or otherwise contributed to the development of this version!

    Especially, a big thank you to Oliver Schmidtmer (@Schmidor) for providing read and write support for TIFF CCITT T.4 and T.6 encodings, and to Jason Palmer (@jasonwpalmer) for initial work and help on the TIFF metadata.

    What's new?

    New features:

    #139 Full TIFF metadata support (read/write), mostly compatible with the TIFF metadata from JAI TIFF plugin #61 Support for TIFF CCITT T.4 and T.6 (TIFF "Class F" Group 3 and 4) encodings (read/write) #157 Support for Radiance RGBE (.HDR) format (read) #184 Read support for TIFF planar data (PlanarConfiguration: 2) (read) #173 Support for CIE Lab* ColorSpace (including ITU and ICC encodings) in TIFF plugin (read) #171 Support for TIFF with RGB + Alpha 4444 (USHORT) #164 Support for TIFF with 32 bit floating point samples #163 Support for TIFF containing signed integral other than short/16 bit #162 Support for TIFF containing gray + alpha. #143 Support for CMYK JPEG in TIFF

    Other improvements/enhancements:

    #179 Fixed broken offsets for 16 and 32 bits PackBits data in PSD files #170 Fixed General CMM error517/LCMS error 13 (now ignoring incompatible ICC profile) #169 Fixed NullPointerException when reading JPEG image #168 Changed Maven test dependencies from classifier test to dtype test-jar for better sbt support #166 Removed printStackTrace() from EXIFReader #165 ICOImageReader no longer prints debug information #158 Building with Java 8 should now work without any special settings #156 Now correctly interprets alpha in TGA format (+ thumbnail & metadata fixes) #154 Fixed AccessControlException when reading "Generic CMYK.icc" in some cases #xxx Added format name synonyms for TIFF format (TIF is now recognized) #146 Now correctly sets ExtraSamples, allowing output of CMYK TIFFs #142 Added missing resource file, now making sure the TIFFImageWriter is registered #140 JPEG with corrupted ICC profile (new kind) can now be read #138 DateUtil now supports sub-hour offset timezones (making tests pass in these timezones) #134 Can now read PSD images with PSD Layer Mask data size 28 #xxx Faster TIFF LZW encoder

    Future plans

    Short term (3.x):

    • Extended JPEG write support.
    • Extended PNM write support.

    Long term:

    • Read support for Cannon RAW (CR2) format.
    • Read support for Adobe Digital Negative (DNG) and TIFF/EP.
    • Consider rewriting the SVG support to use a different SVG library with less dependencies.
    • Better modularization and less/slimmer dependencies.
    • Write support for ICNS.
    • Write support for ICO
    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.1.2(Aug 14, 2015)

    TwelveMonkeys ImageIO 3.1.2 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #146 CMYK TIFFs written by the TIFFImageWriter does not open in Preview/Photoshop #147 CMYK image loading with inverted colors #150 ICO: java.lang.IllegalArgumentException: Pixel stride times width must be less than or equal to the scanline stride #154 java.security.AccessControlException attempting to read ColorSync profiles

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.1.1(Jun 11, 2015)

    TwelveMonkeys ImageIO 3.1.1 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #142 TMI-142: Added missing resource file, now making sure the TIFFImageWriter is registered. #140 TMI-140: JPEG with corrupted ICC profile (new kind) can now be read. #138 TM-138: DateUtil doesn't support sub-hour offset timezones. #134 TMI-134: Cannot read PSD images with PSD Layer Mask data size 28

    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.1.0(Apr 10, 2015)

    TwelveMonkeys ImageIO 3.1.0 release notes

    The TwelveMonkeys ImageIO version 3.1.0 is finally ready for release.

    Thanks to everyone who has committed code, patches, filed bug reports or otherwise contributed to the development of this version!

    Especially, a big thank you to Tilman Hausherr and the Apache PDFBox team, for pushing the JPEGImageReader to its limits, and to Jason Palmer and itemMaster LLC, for their contributions to the Photoshop path reading code and providing sample files.

    What's new?

    New features:

    • The TIFF module now has "baseline TIFF" write support (currently missing the CCITT encodings), plus some popular extensions, such as 16 bit data, LZW and JPEG compressions, predictor, etc.
    • Many improvements to the JPEG module, now a lot more robust than before.
    • Full PNM (PBM, PGM, PPM and PAM) read support and limited write support.
    • Read support for BMP format (with support for a few flavors not supported by the standard BMPImageReader).
    • Read support for more archaic formats: TGA, SGI and PCX.
    • Support for Photoshop paths and clipping in PSD, TIFF and JPEG formats.
    • Improved PSD support and better PSD metadata.
    • The official release now requires at least Java 7.

    Other improvements/enhancements:

    • Loads of bugs fixed since 3.0.
    • Moved more unnecessary code to the sandbox, providing slimmer dependency JARs.
    • The project now by default builds using Java 7. It will also build using Java 8.
    • Finally removed JMagick support (it's time consuming to maintain, and doesn't fit into the "pure Java" philosophy of the project).

    Future plans

    Short term (3.x):

    • Extended JPEG write support.
    • TIFF compression types 2, 3 and 4 (CCITT) read/write.
    • Extended PNM write support.

    Long term:

    • Read support for Cannon RAW (CR2) format.
    • Read support for Adobe Digital Negative (DNG) and TIFF/EP.
    • Consider rewriting the SVG support to use a different SVG library with less dependencies.
    • Better modularization and less/slimmer dependencies.
    • Write support for ICNS.
    • Write support for ICO
    Source code(tar.gz)
    Source code(zip)
  • twelvemonkeys-3.0.2(Jan 3, 2015)

    TwelveMonkeys ImageIO 3.0.2 release notes

    This is a bug fix release.

    What's new?

    The following bugs/issues are fixed in this release:

    #84 TMI-84: LZWDecoder fixes for > 12 bit exception when using full 12 bit (4096 entries) table #89 TMI-89: Fix exception in LZWDecoder for TIFF with LZW strings longer than strip/tile width

    Source code(tar.gz)
    Source code(zip)
Roman Beskrovnyi 250 Jan 9, 2023
Anthos Edge Use Cases for bringing apps and computation closer to the location where the action is, to improve response times and save bandwidth.

Anthos Bare Metal Edge Use Cases Edge computing is a distributed computing paradigm that brings computation and data storage closer to the location wh

Google Cloud Platform 27 Dec 20, 2022
Fast computer vision library for SFM, calibration, fiducials, tracking, image processing, and more.

Table of Contents Introduction Cloning Repository Quick Start Gradle and Maven Building from Source Dependencies Help/Contact Introduction BoofCV is a

Peter Abeles 916 Jan 6, 2023
Java interface to OpenCV, FFmpeg, and more

JavaCV Commercial support: Introduction JavaCV uses wrappers from the JavaCPP Presets of commonly used libraries by researchers in the field of comput

Bytedeco 6.4k Jan 4, 2023
Traditional roguelike game with pixel-art graphics and simple interface

Traditional roguelike game with pixel-art graphics and simple interface

Evan Debenham 2.5k Dec 30, 2022
This project allows the exchange of files between your local disk and a D64 image (Commodore 64 image disk) . Ce projet permet l'échange de fichiers entre votre disque local et une image D64 (Image de disquette du Commodore 64).

DiskToolC64 Ce projet permet l'échange de fichiers entre votre disque local et une image D64 (Image de disquette du Commodore 64). Introduction Les fi

Eddy BRIERE 3 Oct 12, 2022
Pw0 Framewrok - magical android pentest app 🔮! Pixie Dust, Handshakes, Deauth, Nmap, Port scanner and more!

Pw0 Framework Pw0 Framewrok - magical android pentest app ?? ! Features: Pixie Dust Handshakes Deauth Nmap Port scanner and more! Version: 0.2 Beta Au

Huntmix 17 Sep 27, 2021
A well-designed local image and video selector for Android

Matisse Matisse is a well-designed local image and video selector for Android. You can Use it in Activity or Fragment Select images including JPEG, PN

Zhihu 12.4k Dec 29, 2022
Provide image storage and access services.

Provide image storage and access services.

shiyq 2 Jan 23, 2022
Million+ point universal gravity simulation using OpenGL and OpenCL

Universe Simulation on GPU A multi-million particle gravity simulation. The main program is org.davu.app.Space.main See each package.html for code det

David Uselmann 2 Jan 31, 2022
Additional plug-ins and extensions for Java's ImageIO using native libraries

NightMonkeys A collection of ImageIO plugins, adding support for newer image formats. NightMonkeys uses the newer Foreign Linker API available in JDK

Gauthier 20 Dec 3, 2022
Rework of html-java-dsl to work with newer Javas

java-html-dsl Example DSL for writing html in Java. Rework of benjiman/java-html-dsl to work with newer versions of Java This String doc = html(

Benji Weber 19 Jan 25, 2022
Halo plug-in capacity experimental exploration.

Halo plugin experimental Halo 博客插件化的功能性探索。 简介 插件管理能力位于 extensions 目录下 plugins 目录下为插件示例 在插件和 Halo 主应用共用 ApplicationContext 还是 插件使用独立的 ApplicationContex

guqing 8 Jul 17, 2022
Netflix, Inc. 809 Dec 28, 2022
DataFX - is a JavaFX frameworks that provides additional features to create MVC based applications in JavaFX by providing routing and a context for CDI.

What you’ve stumbled upon here is a project that intends to make retrieving, massaging, populating, viewing, and editing data in JavaFX UI controls ea

Guigarage 110 Dec 29, 2022
The quickstarts demonstrate JBoss EAP, Jakarta EE 8 and a few additional technologies. They provide small, specific, working examples that can be used as a reference for your own project.

shared-doc/attributes.adoc WildFly Quickstarts The quickstarts demonstrate Jakarta EE 8 and a few additional technologies from the WildFly stack. They

JBoss Developer 792 Dec 16, 2022