Closed artem-mi closed 4 years ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
:white_check_mark: wasabeef
:x: Artem Matskevich
What does this change?
In setImageBitmap method of GPUImageRenderer the bitmap is resized to have even width. A canvas is constructed to draw to newly created bitmap with additional row: first canvas is fiiled with black and then original bitmap is drawn. The problem is that a density of the created bitmap is implicitly set to the density of the current display (according to the createBitmap method docs) and canvas receives bitmap's density while source bitmap has its own density and is automatically scaled when drawBitmap method called (as stated in drawBitmap docs). This results in that only piece of the source image is drawn to canvas. The workaround is to set resized bitmap density to be equal to source bitmap density.
What is the value of this and can you measure success?
As a result of the fix a padding row is added correctly.