-
Notifications
You must be signed in to change notification settings - Fork 851
Closed
Description
When I load a PNG image only 3 channels are loaded into the matrix:
cv.readImage('path/to/image.png', function(err, img){
if(err) throw err;
console.log(img.channels()); // Prints '3'
img.save('out.png');
});When the file is saved, it is saved without an alpha channel. Looking at the source code for OpenCV.cc I see the image is loaded with cv::imread(filename, CV_LOAD_IMAGE_UNCHANGED). I understood from other sources that CV_LOAD_IMAGE_UNCHANGED should preserve the alpha channel.
Metadata
Metadata
Assignees
Labels
No labels