-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--lossy option that allows inexact match against LZW dictionary, which improves compression ratio. Lossy matching does a bit of 1-dimensional dithering. This is a very basic implementation that does recursive search of dictionary nodes. write_compressed_data contains some duplicated code, because the lossy search function needs to use less optimized code (ignores imageline), although this probably could be refactored a bit. The results are pretty good: — Original: 3.3MB — Lossy: 1.25MB Based on gifsicle which implements lossy LZW compression. It can reduce animgif file sizes by 30%—50% at a cost of some dithering/noise. — https://pornel.net/lossygif — https://github.com/pornel/giflossy Closed: #16
- Loading branch information
Showing
5 changed files
with
281 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -821,6 +821,7 @@ void | |
Gif_InitCompressInfo(Gif_CompressInfo *gcinfo) | ||
{ | ||
gcinfo->flags = 0; | ||
gcinfo->loss = 0; | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.