Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

2.0

Choose a tag to compare

@mutkuensert mutkuensert released this 09 Mar 20:29
· 16 commits to master since this release

Version Notes: 2.0

Features and Changes

  • Code Refactoring

    • The library has undergone significant code refactoring to improve readability, maintainability, and adherence to best practices.
  • Enhanced Compression and Scaling Logic

    • The new version introduces a more flexible and customizable approach to compression and scaling.
    • Improved algorithms ensure efficient file size reduction while maintaining image quality.
  • New Scaling and Compress Static Methods

    • scaleDownToHeight, scaleDownToWidth and compress static methods have been implemented.
  • Dynamic File Overwriting

    • The library now dynamically overwrites the input file during compression for proper size calculation, reducing the need for additional file handling steps.
  • Error Handling

    • The library throws specific exceptions (IllegalArgumentException and RuntimeException) to provide more meaningful error messages in case of invalid input or runtime issues.

Breaking Changes

  • Constructor Parameters

    • The constructor now accepts a File parameter, ensuring a more intuitive initialization process.
  • Method Signature Changes

    • The compress method has been removed from the class, and compression is now handled through the compressAndScaleDown method.
  • Method Renaming

    • The compressByPriority method has been renamed to compressAndScaleDownByPriority for clarity.