nodeca / pica

Resize image in browser with high quality and high speed

Home Page:http://nodeca.github.io/pica/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Canvas bug in Chrome using hardware acceleration

elisbyberi opened this issue · comments

Solution

  1. Turn off Chrome hardware acceleration.
  2. Or, decode and encode images using JavaScript and/or WebAssembly.

Test case

Chrome 80.0.3987.87 using hardware acceleration.
Ubuntu 14.04 Operating System
AMD Athlon(tm) II X2 220 Processor
GeForce 6150SE nForce 430 Graphic Processor

Result

  1. It can not create a correct canvas using JavaScript and WebAssembly.
  2. Using createImageBitmap does work sometimes drawing a blank canvas randomly.

Question

It is not possible to disable hardware acceleration using JavaScript.
Is it possible to avoid use of canvas i.e. decode/encode image without canvas?

Screenshots

2020-02-12-195635_1440x900_scrot
2020-02-12-195657_1440x900_scrot
2020-02-12-195704_1440x900_scrot
2020-02-12-195959_1440x900_scrot
2020-02-12-200009_1440x900_scrot
2020-02-12-200014_1440x900_scrot
2020-02-12-200127_1440x900_scrot
2020-02-12-195626_1440x900_scrot

Also, it does work as advertised without using "alpha channel".

14.04 is about to eol. Can you try in 18.04?

Also, it does work as advertised without using "alpha channel".

Alpha is specific thing, with side effects, disabled by default. If your primary goal is to resize "jpegs" - don't enable alpha.

Yes, my only goal is to resize jpegs.

Thank you for your quick reply.