Skip to content

feat: Compress PNG; detect and compare the size of compressed and uncompressed file

Linca requested to merge linca/catofish:file-comression into develop

What does this PR do? (Please give us a brief description of what this PR does.)

  • Allows compressing PNG images to jpeg

    Many screenshot tools, such as the default screenshot tool in Windows, generate png images and will not compress them when uploading before this commit.

  • Detect and compare the size of compressed and uncompressed file, preventing uploaded "compressed" images from being larger than the source file

    This happens in webp -> png frequently

Contribution Guidelines By submitting this merge request, you agree to follow our Contribution Guidelines

  • This change is reviewed in an issue / This is a minor bug fix
  • I agree to follow this project's Contribution Guidelines
  • I have made sure to test this pull request
  • I have made sure to run pnpm run format before submitting this pull request

If this merge request makes changes to the Firefish API, please update docs/api-change.md

  • I updated the document / This merge request doesn't include API changes
Edited by Linca

Merge request reports