* Need to add/remove channels, one pixel at a time.
*/
- unsigned char *tmp = new unsigned char[width*bytesPerPixel];
+ unsigned char *tmp = new unsigned char[width*outChannels*bytesPerChannel];
if (channelType == TYPE_UNORM8) {
/*
*dst++ = 0;
}
}
- os.write((const char *)tmp, width*bytesPerPixel);
+ os.write((const char *)tmp, width*outChannels*bytesPerChannel);
}
}