image optimizer for web

beeim image processor for web

beeim is an experimental lossless and lossy image processor (PNG) designed to transform the image data for Web (more)

v0.22

beeim

usage — examples

beeim -s1 myfolder
N from 1 to 4, optimization level
beeim -predicter=N *.png
X from ~ 60 to 100, quality level

encoder

bitdepth
original -bitdepth=8 -s4
115.76 KB 90.01 KB
colortype 3 — 4 bits/pixels, 16 colors colortype 3 — 8 bits/pixels, 16 colors
colortype
original -colortype=0 -filter=7 -s4
38.56 KB 35.23 KB
original losslessly optimized
filtering
original -filter=7 -s4
559.29 KB 533.46 KB
original losslessly optimized

palette sorting

palette sorting
original -psortb=1 -filter=8 -s4
41.38 KB 35.77 KB
original -psortb=1 -s4
154.50 KB 126.23 KB

alpha

one transparent
original -aedges -rgb: 229 229 229 -s4
148.24 KB 99.91 KB
colortype 6 — RGB & alpha colortype 2 — RGB + tRNS
one transparent
original -aedges -rgb: 229 229 229 -s4
33.53 KB 26.41 KB
colortype 3 — tRNS: 73 colortype 3 — tRNS: 1
color to alpha
original -aalpha -filter=6 -s4
207.10 KB 187.12 KB
colortype 2 — RGB colortype 6 — RGB & alpha

predicter

higher quality
original -predicter=100
537.87 KB 271.15 KB
butteraugli 0.8346427679 — 3-norm: 0.324535
ssimulacra2 94.45217471
dssim 0.00006582
encoding speed (no deflate) 0.03s
lower quality
original -predicter=1
537.87 KB 107.14 KB
butteraugli 2.5087327957 — 3-norm: 1.301013
ssimulacra2 78.00423028
dssim 0.00194928
encoding speed (no deflate) 0.02s

quantizer

higher quality
original -quantizer=100
537.87 KB 296.62 KB
colortype 6 — 82616 colors colortype 6 — 36443 colors
butteraugli 0.6894908547 — 3-norm: 0.260471
ssimulacra2 95.13557670
dssim 0.00003641
encoding speed (no deflate) 0.04s
lower quality
original -quantizer=1
537.87 KB 179.62 KB
colortype 6 — 82616 colors colortype 6 — 8276 colors
butteraugli 3.0035052299 — 3-norm: 1.325476
ssimulacra2 83.94996991
dssim 0.00105349
encoding speed (no deflate) 0.02s

palettizer

256 colors max
original -palette=100
92.33 KB 35.25 KB
colortype 6 — 6918 colors colortype 3 — 256 colors
butteraugli 1.3800112009 — 3-norm: 0.321013
ssimulacra2 93.89273547
dssim 0.00002056
encoding speed (no deflate) 0.01s

denoiser

denoiser (RGBA) — could be combined with -predicter=N
original -denoise=1 -denoise=4
443.47 KB 207.63 KB 129.04 KB
butteraugli 1.0707074404 2.8093128204
ssimulacra2 91.75104919 83.38541740
dssim 0.00013861 0.00079566
denoiser (text, resized + JPEG 80)
original -denoise=8 -s4
696.34 KB 51.96 KB
denoiser (text, initial noise + JPEG 80)
original -denoise=8 -s4
810.06 KB 50.82 KB

svgz

PNG to SVGZ
original WebP (default) -quality=75
302.60 KB 64.64 KB 55.11 KB
butteraugli 4.3000140190 2.7391533852
ssimulacra2 78.31788628 84.30371809
dssim 0.00107136 0.00062889
encoding speed (total) 0.03s 0.03s
<img src="file.svgz" alt="desc" width="512" height="512">

AddType image/svg+xml .svgz
AddEncoding gzip .svgz

beeim myfile.svgz

pngbr

lossless brotli
original -pngbr -s4
302.60 KB 279.20 KB
AddType image/png pngbr
AddEncoding br pngbr

avif

PNG to AVIF
original -avif=100 -s0 -avif=100 -s4
351.89 KB 20.47 KB 14.26 KB
butteraugli 2.1226286888 1.9591228962
ssimulacra2 85.68887374 86.71181220
dssim 0.00051211 0.00046021
encoding speed (total) 0.07s 0.24s
alpha optimization

beeim

-colortype=N      [0,2,3,4,6]  set colortype
-filter=N         [0-9]        set filter
-bitdepth=N       [1,2,4,8]    set bitdepth

-psorting=N       [0-13] try this group of palette sorting
-psub=N           [1-8] isolate this sorting from the group
-psortb=N         [1-3] try all sorting - set internal effort

-pre              pre-optimize image data without compression
-reset            remove image data optimization

-chunks=N         [1-2] 1: remove all but iCCP, 2: all
-iccp=N           [1-5] optimize iCCP, 1: lossless, 2+: lossy

-inflate          uncompress the image data
-reflate=N        [1-100] recompress the image data
-deflate=N        [1-100] additional iterations over profiles
-qflate=N         [1-3] optimize deflate stream from:
                    1: low, 2/3: high compressed source

-grayscale=N      [1-3] grayscale - 1: RGB, 2: line, 3: average
-graycolor=N      [1-3] (default) auto, 1: red, 2: green, 3: blue

-resize=N         [24-4096] image downscaler (keep ratio)
-rotate=N         1: 90, 2: 180, 3: 270
-denoise=N        [1-4] denoise strength | [5-8] denoise for text
-crop             auto-crop image data

-posterize=N      [1-100] posterizer level
-predicter=N      [1-100] lossy filter using prediction
-quantizer=N      [1-100] color quantizer strength

-palette=N        [0-100] convert to palette
-pdither=N        [0-100] palette dithering (default 75)
-palpha           apply palette only on RGB, preserve alpha

-apremul=N        [0-1] (un)premultiply alpha
-aedges           set transparency to one color only
-anotrans         blend colors to remove transparency
-aalpha           create an alpha channel from the image
-aextract         encode RGB and A files
-acombine         search RGB and A files and combine
-alpha            always encode with an alpha channel
-atrans=N         transform RGB data - 1: extend, 2: color noise
                  3: gray noise, 4: fill avg
                  use -filter=N to transform with this filter

-jpeg=N           [1-100] convert and set JPEG quality
-jsample=N        [0-3]   0: 444, 1: 420 sharp, 2: 420, 3: 400
-jprogressive=N   [0-2]   0: no, 1: yes, 2: y+scans

-webp=N           [1-100] convert and set WebP quality
-wsample=N        [0-1]   0: VP8, 1: VP8 sharp
-webpl            encode to WebP lossless
-wpal             keep palette from PNG, auto use predictors

-avif=N           [1-100] convert and set AVIF quality
-asample=N        [0-3]   0: 444, 1: 420 sharp, 2: 420, 3: 400

-svgz=N           [1-100] convert to SVGZ
                  -jsample=N affects image quality
                  beeim in.svgz = convert to PNG (only its own)

-pngbr            encode to pngbr (brotli)
-fl=N             [1-3] alt lossless regular faster profiles
-sl=N             [1-5] alt lossless regular profiles

-rgb: N N N       use this color for transforms (if applicable)
-s0 to -s4        optimization strategies / compression level
-nodeflate        no compression
-force            always overwrite files

license

download

download (64-bit, win)


14/06/2023 — libraries licenses