You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to facilitate the transition to NAN (issue #28) and allow more flexibility in image sources other than files on disk (e.g. network, streams) (issue #23); the native module will be broken down to 3 modules:
Decoder - Will receive a Buffer object of an encoded image (JPEG, PNG, GIF, etc.) and will create a buffer of uncompressed pixels data.
// buffer is a jpeg image loaded from disk (e.g.)
Decoder.decode(buffer, 'jpeg', function(err, pixbuf){
// pixbuf is a buffer of RGB pixels.
});
Encoder - The counterpart of 'decoder'. Will receive a Buffer object of uncompressed pixels and will create a buffer of an encoded image.
Encoder.encode(pixbuf, 'jpeg', function(err, jpegbuf){
// jpegbuf is a jpeg image
});
Image - Will receive a buffer of uncompressed pixels and create an 'image' object, upon which image operations can be made.
In order to facilitate the transition to NAN (issue #28) and allow more flexibility in image sources other than files on disk (e.g. network, streams) (issue #23); the native module will be broken down to 3 modules:
Decoder - Will receive a Buffer object of an encoded image (JPEG, PNG, GIF, etc.) and will create a buffer of uncompressed pixels data.
Encoder - The counterpart of 'decoder'. Will receive a Buffer object of uncompressed pixels and will create a buffer of an encoded image.
Image - Will receive a buffer of uncompressed pixels and create an 'image' object, upon which image operations can be made.
The text was updated successfully, but these errors were encountered: