Releases: fewlaps/slim-jpg
Support more kind of incorrect files
Since 1.3.3
SlimJPG will depend on TwelveMonkeys. Thanks to it, we've seen that some issues, like the JFIF APP0
marker error, doesn't happen anymore. And, as TwelveMonkey is focused on improving the ImageIO plugins, it will for sure be better day by day. Thanks a lot, @haraldk and TwelveMonkeys collaborators!
Share internal errors
This version adds a field internalError : Exception
in the Result
class of the optimization. So, if something bad happened inside SlimJPG, the user can see what happened. It's a way to share the source ImageIO packages errors when working on pictures that can't be read or written.
Fix an issue with Huffman Code table
Before this version, when a file had an issue with the Huffman Code table, the library just stripped the metadata and went forward. That was a very bad decision that impacted the performance of our servers.
This version fixes it. In addition, it gives... smaller files! As the marketing guys would say, it's a win-win! 🤸♂
Use the metadata flag that gives a smaller file
In earlier versions, you had to choose whether keeping or discarding the metadata. If you don't matter about that and you just want smaller files, now you can leave that decision to SlimJPG. It will try both methods and give the smaller picture possible.
By the way, don't use this release. We tried it on production and it had an issue with files with corrupted Huffman Codes table. If you don't know what's that, just use 1.3.1
😅
Oh, it's shame time: in some strange cases, it could lead to an infinite loop. We hadn't been able to reproduce with tests, because it happened in production with a picture of one of our lovely users, but it happened.
Accept InputStream and File as inputs
More ways to call the library means happier developers that write less code. Yay!
Improved performance in lossless optimizations
It's a slightly improvement but hey, it's something! Let's save some CPU cycles and free the world of some CO2 🚭
Let's use this release on QuitNow! production server
This release fix an issue when trying to optimise and convert to JPG perfectly optimised PNG files.
By the way, this release is being used on QuitNow! production servers for first time, so we'll monitor how it behaves with real user-generated content. Let's make the ex-smokers community happier with faster loading times!
Hello world!
Let's use the library in some staging servers to check how it behaves with random user generated content... don't use this version, by the way! We're still not using it on release environments.