Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to compress the image Error: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference #145

Closed
1 task done
mohdrashidreact opened this issue Feb 2, 2023 · 3 comments

Comments

@mohdrashidreact
Copy link

Current behavior

The image is not getting compressed unable to compress the image Error: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Expected behavior

The image should be compressed it should not raise any error

Platform

  • Android

React Native Version

0.69.0

React Native Compressor Version

1.6.1

Reproducible Steps And Demo

pass the image uri ..
const result = await ImageCompressor.compress(imageUri, {
maxWidth: 1000,
quality: 0.8,
});
return result
}

@github-actions
Copy link

github-actions bot commented Feb 2, 2023

👋 @mohdrashidreact
Thanks for opening your issue here! If you find this package useful hit the star🌟!

@pontustengroth
Copy link

#25 Solved it for me

@numandev1
Copy link
Owner

fixed in the latest version, please feel free to reopen if you get any error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants