
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
image-to-icon-converter
Advanced tools
Convert images (png/jpg/gif) to icons (icns/ico) with Iconfinder's Converter
Convert images (png/jpg/gif) to icons (icns/ico)
This is a simple, unoffical node wrapper for Iconfinder's icon converter utility found here: http://labs.iconfinder.com/converter
Why?
Converting image files to the .icns format is surprisingly difficult to do programmatically on anything else than OSX (using Xcode). You got 'iconutil', 'sips' and 'libicns', but they are OSX only which leaves you in the dust when you want it to work on a linux webserver. Last resort are the myriad of online converters stuck in the 90s (and none of them have an API).
How?
Upload an image file through Iconfinder's API, they do their magic and you get an icon file back. Simple.
npm install image-to-icon-converter
Upload file from disk, convert it and get download URL:
var converter = require('image-to-icon-converter');
var file = __dirname + '/image.png';
converter.uploadConvertDownload(file, 'icns')
.then(function(result) {
// result is a URL to the resulting icon file
console.log(result)
});
If you supply it with a stream, it will return a stream too:
var converter = require('image-to-icon-converter');
var fs = require('fs');
var stream = fs.createReadStream(__dirname + '/image.png');
converter.uploadConvertDownload(stream, 'icns')
.then(function(result) {
// result is a stream of the icns file
result.pipe(fs.createWriteStream('icon.icns'));
});
You can also call each of methods individually (returns promises):
var converter = require('image-to-icon-converter');
converter.uploadStream(fileStream);
converter.uploadFile(pathToFile);
converter.convert(urlToFile, iconType);
converter.downloadFile(convertResult);
converter.downloadStream(convertResult);
FAQs
Convert images (png/jpg/gif) to icons (icns/ico) with Iconfinder's Converter
The npm package image-to-icon-converter receives a total of 0 weekly downloads. As such, image-to-icon-converter popularity was classified as not popular.
We found that image-to-icon-converter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.