LZW оптимізатор (у першу чергу для GIF‑картинок, у тому числі анімованих; придатний також і для Z‑архівів) — це моя персональна збірка (неофіційна, відкорегована і позбавлена кількох недоліків оригіналу, зкомпільована для власного використання, повністю сумісна з MS W2K+ та CPU i686+). Але всі бажаючі можуть абсолютно безкоштовно користатися нею, перезбирати програму з вихідних кодів (модифікації документовані і наявні у архіві разом із логом компіляції та “readme.md”) і навіть все це розповсюджувати за межами ресурсу (проте прямі легко помітні посилання на цю сторінкуобов’язкові). Отож, ця збірка абсолютно легально може бути усіма бажаючими перезібрана для власних потреб під будь‑яку систему, сумісну з вимогами вихідного коду (BSD, linux, MacOS, etc, — деталі англійською мовою далі).flexiGIF shrinks GIF‑files by optimizing their compression scheme (LZW algorithm, obviously invented in 1978, in 1984 Welch improved the LZ78 by Lempel and Ziv). No visual information is changed and the output is 100% pixel‑wise identical to the original file (it’s called “lossless optimization”). And the results are still GIF‑files you can open/view with any standard tool. Animated GIFs are supported as well.
Most files can be reduced by about 2 %.
The only downside: it may takes several seconds or even minutes for a medium‑sized GIF‑image. That’s several magnitudes slower than other GIF‑encoders. Your GIF‑decoder isn’t affected at all — probably it even becomes faster because it has less input to process.
flexiGIF does NOT optimize palette, strip extensions and/or reduces color information. There are many sophisticated tools out there, that excel at that job. flexiGIF is designed to be a tool used after you ran those image‑processing programs.
Proposed toolchain:
create/load GIF‑file(s)
run an image‑optimizer (like GIMP’s plug‑ins: animation‑optimizers diff/GIF)
flexiGIF is a command‑line tool and can be easily used with custom scripts, etc (like G.BAT). Keep in mind, that flexiGIF’s compression is very (!) slow, magnitudes slower than a standard GIF‑encoder.Everything was written in C++ from scratch. No external libraries are required. The code can be compiled with GCC (like mine), CLang and Visual C++.Висловлюватися по суті можна в коментарях (нагадую, що всі коментарі неспішно премодеруються на момент розміщення матеріалу). Цитування та розміщення матеріалів (виключно повне, тобто разом із вихідним кодом!) на інших ресурсах вітається за умови збереження легко помітних посилань на оригінали (і первісний flexiGIF, і цей мій модводночас, — див. інформацію про сайт).
розмір вдалося зменшити з 3,06 MiB (Imagine ver. 1.1.0, 2017.08.02) до 1,77 MiB (спочатку оптимізація GIMP&diff, а потім flexiGIF ver. 2018.11a RVAmod із параметрами “-d=4096 -t=1000000 -r”)