Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

touchup

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

touchup - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

2

demo.js

@@ -22,2 +22,4 @@ 'use strict';

showImage(touchup.scale(imageElement, 2.0, 2.0), 'scale(2,2)');
showImage(touchup.scale(imageElement, 4.0, 4.0), 'scale(4,4)');
showImage(touchup.scale(imageElement, 4.0, 4.0, 'nearest-neighbor'), 'scale(4,4,"nearest-neighbor")');
showImage(touchup.scale(imageElement, 3.0, 0.5), 'scale(3,0.5)');

@@ -24,0 +26,0 @@ showImage(touchup.repeat(imageElement, 7, 9), 'repeat(7,9)',

7

index.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.7.0
(function() {

@@ -25,3 +25,3 @@ var createCanvas, crop, overallSize, overlay, repeat, scale;

scale = function(sourceImage, scaleX, scaleY) {
scale = function(sourceImage, scaleX, scaleY, algorithm) {
var canvas, context, destH, destW, _ref;

@@ -31,2 +31,5 @@ destW = sourceImage.width * scaleX;

_ref = createCanvas(destW, destH), canvas = _ref[0], context = _ref[1];
if (algorithm === 'nearest-neighbor') {
context.imageSmoothingEnabled = false;
}
context.drawImage(sourceImage, 0, 0, destW, destH);

@@ -33,0 +36,0 @@ return canvas.toDataURL();

{
"name": "touchup",
"description": "quick & dirty image manipulation using HTML5 canvas",
"version": "0.0.1",
"version": "0.1.0",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

@@ -21,2 +21,6 @@ # touchup

touchup.scale(sourceImage, scaleX, scaleY, 'nearest-neighbor')
Resize an image with image smoothing disabled.
touchup.crop(sourceImage, ox, oy, ow, oh)

@@ -23,0 +27,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc