1,780 questions
0 votes
0 answers
55 views
Draw a composable into canvas before it is ever drawn to screen
I'm creating an AnimatedVisibility-like API that operates on a Bitmap of the content for enter-exit transitions. I'm using the recommended way to draw a composable's content into a bitmap. Basically ...
0 votes
0 answers
25 views
How to put watermark on image on the same appropriate relative position regardless of Android screen size?
I use this code to put watermark (date and andress) on bitmap captured by camera: public Bitmap putTimestamp(Bitmap src, String date, String address) { float START_X = 40f; float START_Y = ...
1 vote
1 answer
59 views
How to apply ColorFilter to a BitmapDescriptor/Drawable?
I need to add a BitmapDescriptor to my Polyline in Jetpack Compose google maps: val arrowBitmapDescriptor: BitmapDescriptor by remember { mutableStateOf(BitmapDescriptorFactory.fromResource(R.drawable....
0 votes
0 answers
34 views
Android: setImageBitmap with bitmap of QR I'm generating in runtime is not working
I have this code: private fun initQRCode() { binding?.let { val bindingRequired = it val helloWorld = QRCode.ofRoundedSquares() .withColor(R.color.colorPrimaryMid) ...
0 votes
1 answer
64 views
How to see applied Bitmap rotation in Compose
I have an image resource. I convert it to Bitmap. All I want is to rotate it around the center of the screen. If the rotated Bitmap extends the screen, it should be cut. The entire app looks like this ...
0 votes
1 answer
56 views
MediaStore.Images.Media.getBitmap(getActivity().getContentResolver() always rotates vertical image to horizontal
In my app, I'm just trying to select multiple images from gallary and show in recyclerview before uploading into server. In recyclerview, the images appear with original orientation. However before ...
0 votes
0 answers
219 views
Android jetpack compose to bitmap
I'm trying write compose to bitmap. https://developer.android.com/develop/ui/compose/graphics/draw/modifiers#composable-to-bitmap Text("Hello $name!", modifier = Modifier ....
0 votes
1 answer
86 views
How to rotate and flip a Bitmap to a specific orientation, regardless of its initial position?
I'm facing an issue where I want to ensure the image is positioned exactly like Image No. 1 (F): However, when selecting an image from the phone gallery, the image might appear in any orientation or ...
0 votes
1 answer
148 views
Why is sRGB red (#FF0000) incorrectly converted to #EA3323 in Display P3 and then to #d84532 in my Android screen app?
I'm developing an Android app (in Delphi) that loads an image with a pure red color (#FF0000) in the sRGB color space. The image is then decoded into a bitmap with inPreferredColorSpace set to Display ...
0 votes
1 answer
55 views
PNG image not getting converted from bitmap to png and downloaded to downloads directory
I was working on an app where i remove a portrait image's background (on-device) and download it upon being created. I have created the background removed bitmap of ARGB_8888 type and i was just about ...
0 votes
1 answer
73 views
Turning pdf pages into bitmap with original size
I am turnın pdf pages into bitmap and displaying them in a recyclerview but there is a problem original pdf bitmaps have the size of 841*595 but if a render the bitmaps with this size bitmaps looks ...
1 vote
0 answers
56 views
Android Bitmap Heap
According to the documentation https://developer.android.com/topic/performance/graphics/manage-memory starting with Android 8.0 Bitmaps are again stored in the native memory instead of Dalvik heap. ...
0 votes
0 answers
43 views
While setting background Image to linear layout using glide, it appears stretched
How to preserve aspect ratio/scale of image while trying to set it as background image to LinearLayout in Android using Glide? Hi there, I am new to Android developement. What I want to achieve is ...
0 votes
0 answers
46 views
Android ColorMatrix Alpha Threshold and Mask
I am trying to write some code that modifies the alpha value in every pixel in a bitmap such that if the pixels alpha is < threshold the alpha will be set to 0f. I am starting by creating a bitmap ...
1 vote
0 answers
58 views
BitmapFactory.decodeStream() no longer works with GIFs in SDK 35?
For a long time I've been using Picasso to load images into my ImageView. I noticed that on newer devices (Android 35+) the behaviour of BitmapFactory.decodeStream() has changed to now return null for ...