You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to resize an image which has a transparent background. After resizing the image comes with a black background. I did some google around this. I found this solution.
I have used the following code for compressing the images in android. Now it's working fine. bitmap.setHasAlpha(true); bitmap.compress(Bitmap.CompressFormat.PNG, quality, out);
Please do the above changes in source code.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
I don't think your solution is the best because you change the content format from jpg to png. This plugin returns only 'jpg' files, so, if you change the file format to png you will have to check in your ionic project what platform and output (base64 true or false) is used.
Your link to Stack Overflow has the right answer and here is the implemented solution for the jpg with white background.
I am trying to resize an image which has a transparent background. After resizing the image comes with a black background. I did some google around this. I found this solution.
I have used the following code for compressing the images in android. Now it's working fine.
bitmap.setHasAlpha(true); bitmap.compress(Bitmap.CompressFormat.PNG, quality, out);
Please do the above changes in source code.
Thanks in advance.
The text was updated successfully, but these errors were encountered: