Somehow canvas element reacts differently. Could be an issue with smoothing, white pixels are inserted near black lines:  (Thanks to Damian for noticing)