Gathering detailed insights and metrics for pngsmith
Gathering detailed insights and metrics for pngsmith
Gathering detailed insights and metrics for pngsmith
Gathering detailed insights and metrics for pngsmith
npm install pngsmith
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Unlicense License
4 Stars
38 Commits
2 Watchers
4 Branches
1 Contributors
Updated on Jan 28, 2023
Latest Version
0.1.5
Package Id
pngsmith@0.1.5
Size
4.92 kB
NPM Version
2.14.7
Node Version
4.2.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
png
engine for spritesmith.
This can be used for constructing a canvas, placing images on it, and extracting the result image.
Install the module with: npm install pngsmith
1// Convert images into pngsmith objects 2var images = ['img1.jpg', 'img2.png']; 3pngsmith.createImages(this.images, function handleImages (err, imgs) { 4 // Create a canvas to draw onto (200 pixels wide, 300 pixels tall) 5 pngsmith.createCanvas(200, 200, function (err, canvas) { 6 // Add each image at a specific location (upper left corner = {x, y}) 7 var coordinatesArr = [{x: 0, y: 0}, {x: 50, y: 50}]; 8 imgs.forEach(function (img, i) { 9 var coordinates = coordinatesArr[i]; 10 canvas.addImage(img, coordinates.x, coordinates.y); 11 }, canvas); 12 13 // Export canvas to image 14 canvas['export']({format: 'png'}, function (err, result) { 15 result; // Binary string representing a PNG image of the canvas 16 }); 17 }); 18});
This module was built to the specification for all spritesmith modules.
https://github.com/twolfson/spritesmith-engine-test
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint using grunt and test via npm test
.
Support this project and others by twolfson via gittip.
As of Dec 13 2013, Todd Wolfson has released this repository and its contents to the public domain.
It has been released under the UNLICENSE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
project is archived
Details
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More