All Projects → sapics → scale.js

sapics / scale.js

Licence: MIT license
High-quality scale function for canvas and image element. If scale factor < 1, then algorithm for downscale (area average) is used, other than that, bicubic algorithm is used.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to scale.js

downscale
Better image downscale with canvas.
Stars: ✭ 80 (+77.78%)
Mutual labels:  scale, downscale
the-subway-of-china
中国地铁图
Stars: ✭ 104 (+131.11%)
Mutual labels:  scale
BetterDummy
Unlock your displays on your Mac! Smooth scaling, HiDPI unlock, XDR/HDR extra brightness upscale, DDC, brightness and dimming, dummy displays, PIP and lots more!
Stars: ✭ 9,601 (+21235.56%)
Mutual labels:  scale
traefik-ondemand-service
Traefik ondemand service for the traefik ondemand plugin
Stars: ✭ 35 (-22.22%)
Mutual labels:  scale
scale
📦 Toolkit for mapping abstract data into visual representation.
Stars: ✭ 53 (+17.78%)
Mutual labels:  scale
aspect-ratio-imageview
A simple imageview which scales the width or height aspect with the given ratio
Stars: ✭ 72 (+60%)
Mutual labels:  scale
spicedb
Open Source, Google Zanzibar-inspired fine-grained permissions database
Stars: ✭ 3,358 (+7362.22%)
Mutual labels:  scale
postcss
No description or website provided.
Stars: ✭ 59 (+31.11%)
Mutual labels:  scale
react-scale-text
A React library to keep an element's text scaled to fit it's container
Stars: ✭ 39 (-13.33%)
Mutual labels:  scale
go-hx711
Golang HX711 interface using periph.io driver
Stars: ✭ 15 (-66.67%)
Mutual labels:  scale
einet
Uncertainty and causal emergence in complex networks
Stars: ✭ 77 (+71.11%)
Mutual labels:  scale
ASV
[CVPR16] Accumulated Stability Voting: A Robust Descriptor from Descriptors of Multiple Scales
Stars: ✭ 26 (-42.22%)
Mutual labels:  scale
Flutter-KenBurns
Kenburns effect on flutter
Stars: ✭ 82 (+82.22%)
Mutual labels:  scale
nitroml
NitroML is a modular, portable, and scalable model-quality benchmarking framework for Machine Learning and Automated Machine Learning (AutoML) pipelines.
Stars: ✭ 40 (-11.11%)
Mutual labels:  scale
yang-db
YANGDB Open-source, Scalable, Non-native Graph database (Powered by Elasticsearch)
Stars: ✭ 92 (+104.44%)
Mutual labels:  scale
scalem
A jQuery plugin to make any element scalable (responsive).
Stars: ✭ 33 (-26.67%)
Mutual labels:  scale
hedgedhttp
Hedged HTTP client which helps to reduce tail latency at scale.
Stars: ✭ 103 (+128.89%)
Mutual labels:  scale
Temps
λ A selfhostable serverless function runtime. Inspired by zeit now.
Stars: ✭ 15 (-66.67%)
Mutual labels:  scale
serverless-scaleway-functions
Plugin for Serverless Framework to allow users to deploy their serverless applications on Scaleway Functions
Stars: ✭ 58 (+28.89%)
Mutual labels:  scale
single-sign-on-out-jwt-cookie-redis-java-springboot-freemarker
Single Sign Out, Scalable Authentication Example with JSON Web Token (JWT), Spring Boot and Redis
Stars: ✭ 15 (-66.67%)
Mutual labels:  scale

scale.js

High-quality scale function for canvas and image element. If scale factor < 1, then algorithm for downscale is used, other than that, bicubic algorithm is used.

How to use

Please use dist/scale.min.js, because src/scale.js dose not work.

<html><body>
  <canvas id="inputCanvas"></canvas>
  <img id="inputImage" src="..." />
  <canvas id="exportCanvas"></canvas>
  
  <script src="dist/scale.min.js" />
  <script>
  (function(){
    var inputCanvas = document.getElementById("inputCanvas");
    var inputImage = document.getElementById("inputImage");

    var newCanvas1 = scale(0.7,
                           inputCanvas);
    var newCanvas2 = scale({scaleX:1.7, scaleY:1.4},
                           inputImage,
                           document.getElementById("exportCanvas2"));
    var jpegImage  = scale({width:100, height:200},
                           inputCanvas,
                           'jpeg');
    var pngSrc     = scale(0.7,
                           inputCanvas,
                           'png-src');
  })();
  </script>
</body></html>

Licence

MIT Licence

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].