Version 2.0 of the imgscalr Java image-scaling library has been released.
This release matures the library, tightens up every area that could get tightened up and adds some new features:
* API-break: resize(BufferedImage, Method, int, int, boolean, boolean) was removed and
replaced by resize(BufferedImage, Method, int, int).
* DEBUG system variable added; set ‘imgscalr.debug’ to true to trigger debugging output
in the console. The boolean debug and elapsedTime arguments to the resize method
have been removed.
* New BALANCED method added. Provides a better result than SPEED faster than QUALITY.
* Added 2 optimized thresholds (in pixels) that the API uses to select the best Method
for scaling when the user specifies AUTOMATIC (or doesn’t specify a method). This helps
provide much better results out of the box by default and tightens up the performance of the
API a bit more.
* Image comparison generator utility (ComparisonGenerator test class) added.
* Functional portions of API broken into static protected methods that can be
easily overridden by implementors to customize the API without needing to rewrite
the resize methods.
* Consolidated 5 locations of duplicated rendering code into a single method (scaleImage).
* Tightened up image scaling operation to do everything possible to avoid memory leaks (every native
resource is disposed or released explicitly)
* Detailed logging information integrated. If the ‘imgscalr.debug’ system property is
true, the API outputs exactly what it’s doing, what argument values it is processing and
how long it is taking to do each scale operation.
* When AUTOMATIC method is specified, the API is more intelligent about selecting
SPEED, BALANCED or QUALITY based on the images primary dimension only (more accurate).
* Copious amounts of Javadoc added to new methods, new code and existing code.
For download links, Javadoc, source code or example code, head over to the imgscalr page.