Skip to content

Commit fd721c0

Browse files
author
Artem Matskevich
committed
set resized image density to be equal to source image density
1 parent 2f01ae7 commit fd721c0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/src/main/java/jp/co/cyberagent/android/gpuimage/GPUImageRenderer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ public void run() {
239239
if (bitmap.getWidth() % 2 == 1) {
240240
resizedBitmap = Bitmap.createBitmap(bitmap.getWidth() + 1, bitmap.getHeight(),
241241
Bitmap.Config.ARGB_8888);
242+
resizedBitmap.setDensity(bitmap.getDensity());
242243
Canvas can = new Canvas(resizedBitmap);
243244
can.drawARGB(0x00, 0x00, 0x00, 0x00);
244245
can.drawBitmap(bitmap, 0, 0, null);

0 commit comments

Comments
 (0)