Repository navigation
BIC v0.2.0
The BIC2 format replaces BIC1, and BIC1 files can no longer be read. Re-encode
them from the original images.
BIC targets images with large solid areas: screenshots, UI, diagrams,
charts, icons and pixel art. It offers little or no advantage on photographs.
JPEG sources are stored unchanged.
Added
- BIC2 coding:
- a palette for images with up to 256 colors;
- a subtract-green color transform;
- row prediction, either fixed (none or up) or chosen per row (none, left,
up, average, Paeth, MED).
- Exhaustive encoder: it tries every transform and predictor combination
in parallel and keeps the smallest. The default Zstandard level is now 19. - Near-lossless mode (
--max-error N) in the style of JPEG-LS: every
decoded sample is withinNof the original. Lossless candidates are tried
too, so flat graphics stay exact. - Original-file storage: a PNG, JPEG, WebP or HEIF source that is smaller
than BIC's own encoding is stored unchanged, so a.bicfile is never larger
than its original plus 32 bytes.--transcodedisables this. - ICC profiles are stored in the container and written back to PNG
output. - EXIF orientation is applied when reading sources.
--fast-decode: skips per-row prediction for faster opening, at the cost
of slightly larger photographs.bic-view, a viewer without a console window:- File > Open (Ctrl+O) and File > Save as BIC (Ctrl+S), with saving in the
background; - smooth resampling when the window is resized;
- errors shown in a dialog;
- used by the Windows file association.
- File > Open (Ctrl+O) and File > Save as BIC (Ctrl+S), with saving in the
bic compare: benchmarks against PNG, oxipng, WebP lossless and QOI on
files or folders, with CSV output and PSNR for near-lossless runs.bic verify --max-errorfor checking near-lossless files.- Library API:
encode_file,encode_source,read_source,
encode_rgba_with_metadata,decode_with_metadata,storage, and
DecodeLimitsfor untrusted input. clifeature (on by default) for the programs. With
default-features = falsethe library depends only onanyhow,image,
heic-rsandzstd.- Testing: property-based tests and cargo-fuzz targets. CI runs on Linux
and Windows, with fuzzing and a synthetic-corpus benchmark.
Changed
- On the project's benchmarks (geometric mean against oxipng), flat graphics
went from 1.316 to 0.755. Lossless photographs went from 1.849 to 0.837, but
that comparison excludes strong photographic codecs. - Lossless decoding processes whole rows with vectorizable loops.
- The decoder's default memory limit is 512 MiB, set with
--max-alloc-mib.
Removed
--quant-step,--smooth-toleranceand--residual, replaced by
--max-error.is_png_fallback, replaced bystorage.
Fixed
- Block partitioning only ever used 256-sample blocks.
- A malformed file with an inverted channel range could crash the decoder.
- Payloads that decompressed past their declared size were not rejected.
- Encoding an empty image with
--png-fallbackfailed. - Decoding to JPEG failed on RGBA images.