libvips / node-vips Goto Github PK
View Code? Open in Web Editor NEWExperiment with a libvips binding for node using ffi
License: MIT License
Experiment with a libvips binding for node using ffi
License: MIT License
Hi!
libvips has every possible thing I could possibly need for a very involving project and is super fast!
I'm trying to use it from node because there're a few things sharp doesn't do that libvips supports.
The following script produced an image that was 5 times the input size i.e. ~10.2mb to ~56.8mb
var vips = require('vips-ffi');
var image = vips.Image.newFromFile('patrick-hendry-547014-unsplash.jpg');
image.shrink(50, 50)
image.writeToFile('testc.png')
How would I resize an image?
I came across fastcall, I thought let's open an issue to track this.
There is a a popular dynamic binding library for Node.js:
node-ffi. Then why we need another one could ask? For performance! There is a good 20x-40x
function call performance overhead when using node-ffi compared to hand made C++ native module, which is unacceptable in most cases (see the benchmarks).
fastcall has an almost 100% node-ffi compatible interface, so it could work as a drop-in replacement of node-ffi.
(I can't work on this before February 2019, since I'm currently busy with my internship.)
Things that need doing before we could declare 1.0, in no order:
newFromFile()
, for example.bandsplit()
and .bandjoin()
? Should they be .bandSplit()
and .bandJoin()
?Image
, eg. Image.black
should be generated automatically.Image.prototype.bandsplit
Image.prototype.sin
Image.prototype.add
VipsInterpolate
example/thumb.js
in memory mode, investigatevips.call.async
Please add more!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.