Thumbnailator Changelog

What's new in Thumbnailator 0.4.5

Jul 4, 2013
  • This release addresses an issue where the Exif orientation metadata was not being used in the Thumbnailator.createThumbnail methods.

New in Thumbnailator 0.4.4 (May 24, 2013)

  • This release fixes a bug which causes OutOfMemoryErrors when running Thumbnailator on the latest versions of Java 6 and 7 -- Java 6 Update 45 and Java 7 Update 21

New in Thumbnailator 0.4.3 (Jan 4, 2013)

  • Added Exif Orientation support:
  • This release adds support for using the Exif metadata to properly orient thumbnails. ( Issue 13 , Issue 27 )
  • Now, the default behavior is to use the Exif metadata to determine the correct orientation of the thumbnail.
  • However, this behavior can be overridden by disabling the usage of theExif metadata by calling the `useExifOrientation` method with false as the argument.
  • Other fixes:
  • In addition, the message included in the IOException thrown when an error occurs while processing has been changed to better indicate what had occurred. ( Issue 27 )

New in Thumbnailator 0.4.2 (May 9, 2012)

  • This release fixes an issue where the thumbnails are given incorrect file names when using the Rename.SUFFIX_DOT_THUMBNAIL or Rename.SUFFIX_HYPHEN_THUMBNAIL rename option, if the original file name contains multiple "." characters

New in Thumbnailator 0.4.1 (Apr 3, 2012)

  • This release changes the behavior of deciding the size of the thumbnail.
  • From Thumbnailator 0.4.1, the code has been revised to round to the closest integer by using the Math.round method. This means that if the new dimension was calculated to be 15.4 the resulting dimension would both be 15, while a new dimension of 15.6 would result in the dimension being 16.
  • Also, the minimum size of a thumbnail's dimension has been specified to be one. Therefore, under conditions which could lead to the thumbnail having a dimension of zero, the dimension will be promoted to 1, therefore, the aspect ratio of a thumbnail may not be necesarily maintained.

New in Thumbnailator 0.4.0 (Apr 3, 2012)

  • Introduction of the `ResizerFactory` interface which allows finer control over the resizing of images.
  • Enables the use of alternate resizing algorithms.
  • Enables differing resizing strategies depending on the dimensions of the source and destination images.
  • Internal resizing routines have been reworked to use ResizerFactory's.
  • The ResizerFactory class in the 0.3.x series has been essentially renamed to the DefaultResizerFactory class.
  • The following deprecated methods have been removed:
  • fromFilenames(Collection)
  • fromFiles(Collection)
  • fromURLs(Collection)
  • fromInputStreams(Collection)
  • fromImages(Collection)
  • The Rename class now accepts an additional ThumbnailParameter as its argument, which enables finer control over determining a name for the resulting thumbnail image file by providing more context about the image resizing operation.
  • Added the `crop(Position)` method to crop the thumbnail after it has been resized while keeping the aspect ratio. This method has been added to address Issue 24.
  • Fixed two bugs in the `Canvas` class:
  • The background color of images with transparency was being filled black when it should have been left transparent.
  • The width and height of the Canvas could potentially be altered when the Canvas.apply method is called multiple times.

New in Thumbnailator 0.3.10 (Sep 5, 2011)

  • Added the `scale(double, double)` method to create thumbnails by specifying the scaling factors for the width and height independently

New in Thumbnailator 0.3.9 (Aug 16, 2011)

  • Fixed an issue where the file extensions assigned to thumbnails would violate the principle of least surprise

New in Thumbnailator 0.3.8 (Aug 16, 2011)

  • Fixed an issue where the file that the thumbnail was written to remains open, preventing certain programs from accessing the file.

New in Thumbnailator 0.3.7 (Jul 25, 2011)

  • Added the `allowOverwrite(boolean)` to specify the behavior of whether or not to overwrite existing files when creating thumbnails.
  • The allowOverwrite(boolean) method will affect the behavior of the following methods:
  • `toFile(File)`
  • `toFile(String)`
  • `toFiles(Iterable)`
  • `toFiles(Rename)`
  • `asFiles(Iterable)`
  • `asFiles(Rename)`
  • Some changes have been made to the behavior of the methods listed above with respect to handling files which have not been written due to the destination file existing at the time the thumbnails were being produced.

New in Thumbnailator 0.3.6 (Jul 11, 2011)

  • Fixed an issue which was causing thumbnails to be incorrectly written to the destination file if it already exists

New in Thumbnailator 0.3.5 (Jul 11, 2011)

  • A feature has been added to create a thumbnail by only specifying either the width or height

New in Thumbnailator 0.3.4 (May 3, 2011)

  • It is now possible to specify the source region from which a thumbnail is produced

New in Thumbnailator 0.3.3 (May 3, 2011)

  • Fixed a bug which causes an IllegalStateException when creating a GIF thumbnail with the compression quality settings specified

New in Thumbnailator 0.3.2 (Mar 22, 2011)

  • Added the forceSize method to the Thumbnails builder interface to force the size of the thumbnail to the specified dimensions. (equivalent to using the size method along with the keepAspectRatio(false) method.)
  • Added the Canvas image filter class which can be used to crop or add a border to the resulting thumbnail.

New in Thumbnailator 0.3.1 (Mar 22, 2011)

  • It is now possible to use an Iterable to specify the original images through one of the from methods:
  • fromFilenames(Iterable)
  • fromFiles(Iterable)
  • fromURLs(Iterable)
  • fromInputStreams(Iterable

New in Thumbnailator 0.3.0 (Mar 22, 2011)

  • Enhanced support for inputs and outputs:
  • Removed the restriction that the output type must be the same as the input type -- for example, Thumbnailator 0.2.x required that a thumbnail created from an image file be saved to a file.
  • It is now possible to retrieve thumbnails as an Iterable:
  • This feature allows retrieval of thumbnails as they finish processing, rather than waiting until all thumbnails are processed.
  • This can potentially avoid OutOfMemoryErrors, as Thumbnailator only needs to hold a reference to one thumbnail at a time.
  • Added input sources and output destinations:
  • Added support for retrieving images from URLs and InputStreams.
  • Added support for storing thumbnails to OutputStreams.
  • Added APIs to generate file names:
  • Newly created net.coobird.thumbnailator.name package contains classes to generate file names for thumbnails being saved to files.
  • Reorganized packages:
  • Moved Coordinate, Position and Positions classes to the net.coobird.thumbnailator.geometry package.
  • Moved the Rename class to the net.coobird.thumbnailator.name package.
  • Moved the BufferedImages and ThumbnailatorUtils classes to the net.coobird.thumbnailator.util package.
  • Removed deprecated methods and classes:
  • Methods and classes which were marked as deprecated in Thumbnailator 0.2.x have been removed.
  • All output methods of the fluent interface (including asBufferedImages and asBufferedImage) now throw IOException

New in Thumbnailator 0.2.9 (Mar 22, 2011)

  • Added the Transparency image filter for changing the opacity of the resulting thumbnail.
  • Fixed a bug where calling the asBufferedImage method causes a NullPointerException if the original images did not originate from a BufferedImage.

New in Thumbnailator 0.2.8 (Mar 22, 2011)

  • Minor changes were made to the Thumbnails builder interface:
  • Added an override for the outputQuality method which accepts a double.
  • Added null argument checks for in the configuration methods of the builder interface.
  • Added checks to see that a supported format is specified in the outputFormat method.
  • Added checks to the outputFormatType method, to ensure that the type and format parameters will not be in a state which could cause problems when saving thumbnails.

New in Thumbnailator 0.2.7 (Mar 22, 2011)

  • Added methods to the Thumbnails builder interface to accept Collections.
  • Fixed the behavior for adding a file extension to the name of the resulting thumbnail when the output format does not match the given extension.
  • Updated the ThumbnailParamterBuilder class to better support the current specification of the ThumbnailParameter class.

New in Thumbnailator 0.2.6 (Mar 22, 2011)

  • Fixed an issue where saving a thumbnail with transparency to a BMP image causing an exception.
  • Changed ThumbnailTask.write from returning boolean to void, and added the UnsupportedFormatException class used to indicate that a format is not supported for the specified operation:
  • The StreamThumbnailTask and FileThumbnailTask classes have had their write methods modified to throw the UnsupportedFormatException and not return a boolean on return.
  • Added Thumbnailator.createThumbnail(InputStream, OutputStream, String, int, int) which can be used to specify the format to use for the output data.
  • Changed the asBufferedImage method to throw an IllegalArgumentException when multiple images are specified in the Builder.of method. This makes the behavior more consistent with the toFile method.
  • Removed the restriction that Thumbnails.Builder.asBufferedImage must have BufferedImages as the source.
  • ThumbnailMaker classes will now throw an IllegalStateException when the size, aspect ratio or scaling factor is specified more than once:
  • The FixedSizeThumbnailMaker and ScaledThumbnailMaker classes have been modified due to this change.
  • Added null argument checks for the Thumbnails.of methods

New in Thumbnailator 0.2.5 (Mar 22, 2011)

  • Changed the Thumbnails class to create thumbnails with the same image type as the original image:
  • This change was made to address an issue where color distortions occurred in the resulting thumbnail when the original image was a JPEG. This occurred due to the original behavior to create a thumbnail image with an alpha channel. The default JPEG encoder implementation which ships with the JRE appears to cause color distortions for images which contain an alpha channel.
  • Changed the FileThumbnailTask.read() method to throw a FileNotFoundException when the File specified to obtain the original image does not exist.
  • Added and improved documentation.

New in Thumbnailator 0.2.4 (Mar 22, 2011)

  • Fixed issues with the ProgressiveBilinearResizer class:
  • Fixed an issue which lead to quality degradations for thumbnails when the original image was less than twice the size of the thumbnail.
  • Fixed an issue with thumbnails of transparent images containing magnified images of the thumbnail in the background.

New in Thumbnailator 0.2.3 (Mar 22, 2011)

  • The Thumbnails class is now the entry-point into the fluent interface of Thumbnailator:
  • The non-fluent interface methods have been moved from the Thumbnails class to the Thumbnailator class
  • The non-fluent methods such as createThumbnails remain in the Thumbnails class, however, they have been deprecated and will be removed in the next major revision of Thumbnailator
  • The Thumbnails.Rename has been promoted to a top-level class:
  • The class remains available in the Thumbnails class, however, it has been deprecated and will be removed in the next major revision of Thumbnailator.
  • Added the Thumbnails.resizer to specify the Resizer to use when creating thumbnails.