Skip to content

Releases: Clearmist/comic-archive-handler

v2.3.1

Choose a tag to compare

@Clearmist Clearmist released this 15 Oct 00:13

Readme update

v2.3.0

Choose a tag to compare

@Clearmist Clearmist released this 14 Oct 23:46

Archive writing is now more deterministic by always using the same modification time.

v2.2.3

Choose a tag to compare

@Clearmist Clearmist released this 12 Oct 19:56
  1. Zip files store already compressed images.
  2. convertArchive can strip and rename in the same pass and report what it wrote.
  3. Several metadata schemas are written in one rewrite.
  4. Zip writes no longer deflate jpg, png, gif, webp and avif entries.
  5. convertArchive gains the strip, renameImages and onEntry options.
  6. The new addMetadataSetToArchive writes ComicInfo and MetronInfo together.
  7. convertImageBuffer decodes a JPEG page once instead of twice.

v2.2.2

Choose a tag to compare

@Clearmist Clearmist released this 12 Oct 05:49

The RAR adapter read the entire file into a buffer, copied it, and had node-unrar-js extract every entry before yielding the first one so even listing entry names cost several times the archive's size in memory.

It now reads the archive from disk through node-unrar-js's file extractor. Listing only walks the entry headers and an entry is decompressed through a staging file when its stream is opened, one entry at a time. A Buffer input is written to the staging directory first.

RAR reads now use the tempDir option. Reading a single entry from a solid archive, or reading entries out of archive order, costs an extra decompression pass.

v2.2.1

Choose a tag to compare

@Clearmist Clearmist released this 11 Oct 22:44

Bug fix: zip writes resolve only on finish to guarantee every byte has been written before continuing.

v2.2.0

Choose a tag to compare

@Clearmist Clearmist released this 11 Oct 04:14

New readAsarHeaderProperty and writeAsarHeaderProperty functions.

v2.1.0

Choose a tag to compare

@Clearmist Clearmist released this 28 Sep 00:07

Added functionality to detect corrupt images.

v2.0.0

Choose a tag to compare

@Clearmist Clearmist released this 27 Sep 18:48

2.0.0

This release replaces sharp with @napi-rs/image for all image work and adds AVIF as an output format. Some image options had no equivalent in the new library, so this is a major release. See Breaking changes and Migrating from 1.x below.

New

  • AVIF output. convertImageBuffer, convertArchiveImages, and convertArchive accept 'avif' as a format. The new options.avif group supports:
    • quality (0 to 100, default 90; 100 is lossless)
    • alphaQuality (defaults to quality)
    • speed (1 to 10, default 4)
    • chromaSubsampling ('4:4:4' by default to keep colored line art sharp; '4:2:0' gives smaller files)
    • threads (encoder threads per image, default 0 for every core; pass 1 when converting several images at once with concurrency)
  • AVIF pages are recognized as images. avif is now in IMAGE_EXTENSIONS, so AVIF pages work with image info, perceptual hashing, renaming, and later conversions.
  • The benchmark includes AVIF. BENCHMARK_IMAGE_FORMATS is now webp, avif, png, jpg, so a default benchmarkArchive run produces 16 archives instead of 12. Use options.imageFormats (or --image-formats= in benchmark.js) to pick a subset.

Breaking changes

  • sharp is no longer a dependency. Image decoding and encoding now use @napi-rs/image.
  • setImageConcurrency has been removed. It set libvips threads per image, and the new library has no equivalent setting. Images still run on libuv's threadpool (4 threads by default), so raise UV_THREADPOOL_SIZE to convert more than 4 images at once.
  • WebpOptions.effort and WebpOptions.smartSubsample have been removed. WebP encoding now takes only quality (default 92).
  • Perceptual hashes have changed. computeImagePHash and computeArchiveImagePHash now resize and convert to grayscale with a different library, so their values will not exactly match hashes from 1.x. Recompute any stored hashes before comparing them against new ones.
  • PNG compressionLevel maps to three levels. It still accepts 0 to 9, but 0 to 3 is fast, 4 to 6, and 7 to 9 is best. The default is 8.
  • PNG palette quality works differently. With palette: true, quality is now the maximum quality for palette quantization (default 100). File sizes for the same setting will differ from 1.x.

Fixes

  • pHash handles images with transparency. Pages with an alpha channel, 16-bit pages, and floating-point pages are now read correctly.

Migrating from 1.x

  • Remove calls to setImageConcurrency. To run more than 4 images at once, set UV_THREADPOOL_SIZE before the process first uses the threadpool.
  • Remove effort and smartSubsample from any webp options. TypeScript will flag them.
  • If you store perceptual hashes, recompute them with 2.0.0.

v1.7.0

Choose a tag to compare

@Clearmist Clearmist released this 27 Sep 04:29

Added an image concurrency option and function.

v1.6.0

Choose a tag to compare

@Clearmist Clearmist released this 27 Sep 02:16

Added image reading functions