Advertisement
Oakminati

Avif Conversion Pipeline

Apr 20th, 2023 (edited)
4,078
2
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 2 0
  1. *Used for Manga UP! *.avif images;
  2.  
  3. 1. Converted from AVIF source images to PNG using ImageMagick;
  4. - magick convert image.avif image.png
  5. 2. Used Waifu2x denoise only @ level 2 with CUnet Model.
  6. 3. Merged any split dual-pages and fixed up any pages where needed.
  7. 4. Converted to 16 Colors Grayscale PNG (4bit), except for (grayscaled)color pages using ImageMagick (Oak releases only).
  8. - magick mogrify -format png -quality 10 -dither FloydSteinberg -colorspace Gray -posterize 16 -auto-level *.png
  9. 5. Lossless Optimizing images using Pingo
  10. - pingo -sb -strip *.png / pingo -s9 -strip *.jpg (pingo a70) [old releases]
  11. - pingo -l -s4 (pingo 1.x)
  12.  
  13. With step 4 & 5 more than 60% file size reduction is achieved. Reducing colors to 16 is quite justified for these high resolution grayscale images, even if you zoom in quite a bit you still won't or hardly see any differences. Color and grayscaled color images are left untouched and are only optimized with Pingo.
  14.  
  15. * When the page is of a lower resolution, like x1280, and I've notice these, it will be only denoised and optimized and tagged with {LQ}. Meaning these will stay 8-bit (256 colors) PNG images.
  16.  
  17. * Oakii releases are not posterized to 16 colors (4-bit) and are only lossless optimized after denoising.
  18.  
  19. 1) ImageMagick 7.1.0-43 Q16-HDRI x64 [later versions cause weird graying during avif to png conversions]
  20. 2) Waifu2x-caffe
  21. 3) Pingo 1.x (old releases used Pingo a70)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement