Get correct pixels from canvas

When I try to get image data from my png everything works fine on every browser. For most of the users it works also fine. But, on some computers this code

imageData = ctx.getImageData(0, 0, img.width, img.height).data;

returns pixels where some of the colors are lower or higher by 1. This only happens on Firefox and IE. Chrome returns correct result even on these computers.

I find out that this could be related to color profile on user computer. Is there any way to get original data without browser applying color correction?

I'm using offscreen canvas and these images have no alpha channel, so there shouldn't be any problem.

I load image from datauri, if it makes any difference.

Answers:

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.