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
I have added this code to camenjs, it's working for me fine. Review the code add it if feel useful.
Code
Filter.register("opacity", function (adjust) {
adjust = Math.floor(255 * (adjust / 100));
var imageData = this.imageData.data,
length = imageData.length;
// set every fourth value to 50
for (var i = 3; i < length; i += 4) {
imageData[i] = imageData[i] == 0 ? imageData[i] : adjust;
}
// after the manipulation, reset the data
this.imageData.data = imageData;
this.context.putImageData(this.imageData, 0, 0);
});
The text was updated successfully, but these errors were encountered:
We need opacity for the image -
I have added this code to camenjs, it's working for me fine. Review the code add it if feel useful.
Code
The text was updated successfully, but these errors were encountered: