Skip to content

Instantly share code, notes, and snippets.

@diachedelic
Created June 20, 2019 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diachedelic/a81e627c2a38c5e7e1bf50af3ced430b to your computer and use it in GitHub Desktop.
Save diachedelic/a81e627c2a38c5e7e1bf50af3ced430b to your computer and use it in GitHub Desktop.
quality vs filesize resulting from `canvas.toBlob(cb, 'image/jpeg', quality)`
0 0.008210771260531026
0.01 0.008210771260531026
0.02 0.008216896670125255
0.03 0.00887707970416994
0.04 0.010482277318390965
0.05 0.01241246194163914
0.06 0.014545125382029886
0.07 0.01679247010204592
0.08 0.01906057315457573
0.09 0.021325273201775415
0.1 0.02367504838222828
0.11 0.025973438182196225
0.12 0.028176203532387593
0.13 0.030328604403693078
0.14 0.03218936771820666
0.15 0.034091307397214776
0.16 0.0362314574493318
0.17 0.03812693141821268
0.18 0.03966611072902924
0.19 0.04129002487256596
0.2 0.04335462820635416
0.21 0.04559822962050705
0.22 0.04712515811213515
0.23 0.04835976844590532
0.24 0.04969885104331039
0.25 0.051358496742813446
0.26 0.05360516086176346
0.27 0.05620539723451369
0.28 0.05842517761135569
0.29 0.059798290262062036
0.3 0.061060464939006236
0.31 0.062101444269492156
0.32 0.06297669724040089
0.33 0.06427358257171238
0.34 0.0649691568611904
0.35 0.06670605078168734
0.36 0.06823059716958435
0.37 0.06922767773131162
0.38 0.07227132569857744
0.39 0.07481064827591839
0.4 0.07662445011687621
0.41 0.0807982361542773
0.42 0.08231937953684416
0.43 0.08383575871194887
0.44 0.08568869511420316
0.45 0.08641217404738821
0.46 0.08782782426472115
0.47 0.08814294255829093
0.48 0.08945037720612582
0.49 0.09078741800033281
0.5 0.09093851143699046
0.51 0.09103924039476223
0.52 0.09241337394706761
0.53 0.09385522730544253
0.54 0.09415809477982386
0.55 0.09503743135712873
0.56 0.09592051124029675
0.57 0.09775813411856547
0.58 0.09957125535845726
0.59 0.10048292048639836
0.6 0.1018080507619499
0.61 0.10486394954840418
0.62 0.10620881725487047
0.63 0.10995484552227454
0.64 0.11221750376627615
0.65 0.11860324326825993
0.66 0.12214883452171951
0.67 0.12806325778548067
0.68 0.13972569735235976
0.69 0.14846767774492364
0.7 0.15984154245980794
0.71 0.16542315180228268
0.72 0.16808362136937616
0.73 0.17122017138215442
0.74 0.1746289618213429
0.75 0.17489235443389475
0.76 0.176851464602449
0.77 0.17986006161481452
0.78 0.18351216693510708
0.79 0.18553627450546675
0.8 0.1896505079495906
0.81 0.19325122788939825
0.82 0.19573303967666006
0.83 0.1984802858796718
0.84 0.20007901778376555
0.85 0.2026292299781629
0.86 0.2076534270475628
0.87 0.21083183402590164
0.88 0.21933356224215855
0.89 0.2253762788068655
0.9 0.23471140302847057
0.91 0.23808242010849462
0.92 0.24178727201140415
0.93 0.2507075698832667
0.94 0.26578118199306533
0.95 0.28901792328877324
0.96 0.3090871472231987
0.97 0.3328836828957125
0.98 0.37172252302898784
0.99 0.48045807174147775
1 1
@diachedelic
Copy link
Author

Left hand column is quality argument, right hand column is a proportional filesize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment