Questions tagged [android-bitmap]

A Java Object from android.graphics.Bitmap that represents a Bitmap.

Filter by
Sorted by
Tagged with
0 votes
1 answer
36 views

How to do converter ArrayList<Bitmap> for room in kotlin?

Hi I need to store array of Bitmaps in Room database like @ColumnInfo(name = "imageList") var imageList: ArrayList<Bitmap> but I couldn't do it right way because of my converter I ...
Abdullah's user avatar
  • 283
0 votes
0 answers
29 views

How can I convert a Bitmap to YUV420 in Android?

I'm trying to convert a bitmap to YUV420 on Android, but I haven't been successful. Is it possible to convert it properly? The code I'm using looks like this: fun bitmapToYUV(bitmap: Bitmap): ...
Mustafa Maden's user avatar
0 votes
1 answer
67 views

Maui.CSharpMath.SkiaSharp Canvas trying to draw too large bitmap

I am using Maui and library CSharpMath.SkiaSharp and MathPainter from there too create latex formulas. I have an editor where the user enters latex. Using MathPainter, I draw the latex formula as a ...
Death_Dealer's user avatar
1 vote
1 answer
47 views

Bitmap to MP4 green stripes in Pixel 3

I'm developing an application that has a feature that converts from an array list of Bitmap Images into MP4 video. I used MediaMuxer and MediaCodec to do this. Everything works fine on almost all ...
Jackson Daniel's user avatar
0 votes
2 answers
45 views

How to fix OutOfMemoryError exception in android?

I am new to android development in fact. I have an android app dealing with large length of list and each list item has bitmap thumbnail. The app load the entire database so it is clearly not ...
Shiro Ennosuke's user avatar
0 votes
0 answers
56 views

OutOfMemoryError - OOM allocating Bitmap with dimension

I'm simply trying to load an image into an ImageView. However, I'm getting this error on a Samsung Galaxy A02: OOM allocating Bitmap with dimensions 960 x 1440 Why is it a sci-fi feature in 2023 to ...
Adam Varhegyi's user avatar
0 votes
1 answer
76 views

Activity com.example.BasicActivity has leaked window DecorView@ec0c7fa[BasicActivity] that was originally added here

I have some problem, but i dont know what is causing this issue. Once I click on set as wallpaper button dialog disappear automatically even sometime setting a wallpaper taking long time. I try to set ...
Rohit Kumar Sehrawat's user avatar
0 votes
0 answers
26 views

Bitmap.createBitmap(sourceBitmap,x,y,width,height) creating issue

I am using Bitmap.createBitmap(sourceBitmap,x,y,width,height) for image cropping from a specific area, it is working fine but after doing certain number of operation(after capturing 8-9 images) I am ...
SOHEBAHEMAD SHAIKH's user avatar
0 votes
0 answers
676 views

how to resolve Could not copy bitmap to parcel blob in android 12

I am converting bitmap to File and sending to the server , after response is successful then have go another activity but it getting crash in android 12 but working fine in android 11 E FATAL ...
Jaydip Chavda's user avatar
0 votes
0 answers
53 views

How to solve texture being cut off when drawing Bitmap with antialiasing in Android?

I've been making game information application. It's basically showing stats, information of game that I play (with many others). This game has animation, and I managed to make my own View that draws ...
Mandarin Smell's user avatar
1 vote
0 answers
116 views

Convert bitmap to video in Android

I'm trying to convert two lists of bitmap to video. First list are the main bitmaps that make a video and second bitmap list contains the bitmap that would be drawn on the video frame by frame. Both ...
Adnan Aslam's user avatar
0 votes
0 answers
134 views

Android Share image from Url using Coil

My app is using Coil to load the image from external URL, when Coil loads the image I want to add option to share this image, but I do not want to ask the user for any permissions (a bit of overkill ...
Coder123's user avatar
  • 824
0 votes
0 answers
43 views

Bitmap is giving back width and height reversed

The app adjust the canvas comparing its aspect ratio with the image aspect ratio. It works fine in mobile and tablet horizontally, but when the tablet is vertical, the img parameters width and height ...
Jose Navío's user avatar
0 votes
0 answers
31 views

Drawing Bubbles in Android Studio Java

I'm building a game for my Android app studio class, and the game's objective is to pop the bubbles. I currently have 7 bubble textures installed in the game and set up under the Bubble.java file (See ...
Ablac's user avatar
  • 47
0 votes
1 answer
59 views

How to crop imageProxy

I want to crop ImageProxy, In order to analyze data only in preview bounds. I try so many things, And here is what I found, I just create custom view for overlay, that contains only ConstraintLayout ...
Nika Mgaloblishvili's user avatar
0 votes
1 answer
48 views

Ways to Fix Out Of memory Exception in Bitmap.createBitmap method

I have the following code to convert a view to Bitmap to send it for printing. It's throwing OutOfMemoryError on Bitmap.createBitmap: Failed to allocate a 43899852 byte allocation with 9531608 free ...
Vikas Pandey's user avatar
  • 1,125
0 votes
1 answer
92 views

How to force an image to be loaded as ALPHA_8 bitmap on Android with BitmapFactory or ImageDecoder?

My goal is to upload a GL_ALPHA texture to the GPU and use it with OpenGL. For that, I need a bitmap in ALPHA_8 format. Currently, I'm using BitmapFactory to load a 8-bit (with grayscale palette) PNG ...
Ariel Malka's user avatar
  • 15.8k
-1 votes
1 answer
77 views

save a view to Bitmap without displaying it in Android using Kotlin

how can we save a view to Bitmap without displaying it in Android using Kotlin Earlier we used View.setDrawingCacheEnabled(true); Bitmap bmp= View.getDrawingCache(); but now getDrawingCache is ...
1234567's user avatar
  • 2,306
0 votes
0 answers
21 views

copy image picked by user into larger image

i have an app that lets the user pick an image from the device. I create a Bitmap from it and at a certain point i want to copy that image into a larger image. Not scaling it just copy it at a certain ...
Jens Stuber's user avatar
-1 votes
1 answer
60 views

How To setImageBitmap from Url (https) (java)

I used this function to convert url to bitmap : public static Bitmap getBitmapFromURL(String src) { try { URL url = new URL(src); HttpURLConnection connection = (...
Vinhjay's user avatar
0 votes
0 answers
28 views

I got a problem about convert url to bitmap in android studio

I try to convert url link to Bitmap, and used setImageBitMap but it didn't work. I think it's because getBitMapUrl function, if i get image from drawable resource, my app still launch This is my code: ...
gray2593's user avatar
-1 votes
1 answer
53 views

My app doesn't run on Android Studio, I get: E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException

This is my code: package edu.huflit.comicsapp1; public class App extends Application { public static ArrayList<Comics> data; @Override public void onCreate() { super....
Shillwi2593's user avatar
0 votes
0 answers
49 views

TFLite Model Not Analyzing Bitmap

I cannot identify precisely what the problem is, but I know it is a problem with how a TFLite model is receiving a bitmap, as I tried sending it a different way through calling the Camera intent and ...
coder111's user avatar
0 votes
0 answers
57 views

How to efficiently draw an image from byte[] array in the RGB888 format (no alpha channel)?

I need to display an image in a view. I was going to override View.onDraw(Canvas) and follow tutorials on displaying a Bitmap, when I discovered that Bitmap does not support the 888 format, only 8888 (...
Violet Giraffe's user avatar
1 vote
0 answers
16 views

Shot image is displayed in the wrong orientation. It only works in the emulator

I have an understanding problem. I take a photo and then want to display it in the correct orientation. If I run through the whole thing on the emulator, everything works. Only on the right device, ...
Captai-N's user avatar
  • 1,228
1 vote
1 answer
217 views

How to draw an image inside a drawable with its boundaries limited to that drawable with compose

After a lot of research and tries, I decided to ask you for some help. I have 2 drawables that I'd like to merge into one. The one going on top should be limited to the shape of the one behind. This ...
PAF's user avatar
  • 43
0 votes
2 answers
147 views

Issue converting Base 64 to Bitmap in Kotlin - Android

I am using below method to convert Base64 Image to Bitmap: fun convertString64ToImage(base64String: String): Bitmap { val decodedString = Base64.getDecoder().decode(base64String) return ...
Jaimin Modi's user avatar
  • 1,541
0 votes
0 answers
106 views

I can't share an image using Intent in android app : (err : unknown attachment | can't open file . .) |Kotlin | Android

The problem is that when I'm using Intent to share an image which I created in my drawing app , any app I choose couldn't open image to share that. for example : Unsupported attachment! or unable to ...
 Mohammad Mehdi Hosseini's user avatar
1 vote
0 answers
63 views

Image appear blank/red when picking an image from gallery in some android phones?

The picked image mostly works on all phone devices. But some users reported getting blank/red image when picking an image. I use the code below to pick an image Intent intent = new Intent(); intent....
Aman's user avatar
  • 2,284
0 votes
0 answers
24 views

Cutting out a part of Bitmap

How can I cut out a part of the bitmap, leaving its remnants in the original bitmap so I can lately use it for RenderEffect without rendering part I cut earlier? I tried to use canvas.clipRect() and ...
Yaroslav Zhuk's user avatar
0 votes
0 answers
136 views

Android View to Bitmap - View.Draw(Canvas)

I am taking a screenshot of my Android app in order to include it in a .pdf report. On devices with API Level >= 26 I am using PixelCopy successfully, and I get a proper image. For devices with API ...
Miguel's user avatar
  • 143
0 votes
1 answer
263 views

Google ML Kit face detection can not identify faces from uri

I'm using google ml kit for face detection, then use bounding Box function to crop faces. I successfully integrate cameras ,then want to add select from gallery function, which I successfully ...
Ulvi Ismayilov's user avatar
0 votes
0 answers
29 views

Android. How to setImageBitmap without using settings of previous seated bitmap?

I'm using ZoomableImageView https://github.com/jsibbold/zoomage/blob/master/zoomage/src/main/java/com/jsibbold/zoomage/ZoomageView.java. And everything works fine. But I have a problem. Suppose I ...
testivanivan's user avatar
  • 1,124
0 votes
2 answers
268 views

How to get bitmap from ViewGroup?

I'm using recycler view where each item is simple ImageView. My RecyclerView is places in a ViewGroup - FrameLayout. My task is to get from my FrameLayout - a bitmap. That is, I need to get a bitmap ...
testivanivan's user avatar
  • 1,124
0 votes
1 answer
200 views

Why DeadObjectException during AIDL call using byte[] but not Bitmap?

Let's say there are two processes. I am interested in making an AIDL call (e.g. byte[] getBytes()) from an Activity (Process A) to a Service (Process B) which returns a byte[] of data. However when ...
code's user avatar
  • 5,404
0 votes
0 answers
42 views

Android. How to effective frequently create bitmap?

I'm using library which takes bitmap. At first I'm showing bitmap in ZoomableImageView. But after scale, zoom I need to send to the library only visible part of image view. Here is my code to create ...
testivanivan's user avatar
  • 1,124
0 votes
0 answers
43 views

Android. How to get scaled bitmap?

I'm using custom zoomable image view. Here is example of such a view: https://github.com/jsibbold/zoomage/blob/master/zoomage/src/main/java/com/jsibbold/zoomage/ZoomageView.java. Everything works well,...
testivanivan's user avatar
  • 1,124
2 votes
0 answers
23 views

Saving photo with transparent background to Contacts

I want to add a contact to the android contacts database which is working fine. As a Contact Photo there is a Vector from resource which gets converted to a Bitmap and then into a ByteArray like this: ...
Chris Pi's user avatar
  • 576
0 votes
0 answers
40 views

How to rotate and a Bitmap or Media.Image from landscape to portrait W x H -> H x W?

There are a 1000 answers on Stack Overflow, but all of them use a matrix transformation and looking at the code a WxH image is created which has the dimensions of the original WxH. Just two examples: ...
Csaba Toth's user avatar
  • 10.1k
0 votes
0 answers
66 views

How to insert image (Bitmap) to RTF file format and save to internally in android kotlin?

I'm trying to insert image file to RTF file format and save to locally. Here, I've get the image from camera or gallery and convert that image to bitmap format. Now, I can try to insert this image to ...
RaJ's user avatar
  • 840
0 votes
0 answers
61 views

Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()'

I am trying to get the edit text bitmap by using createBitmap() but there is an error. I have gone through different answers but they didn't work for me. Can anyone solve this issue? Here is my code: ...
Jadu's user avatar
  • 589
0 votes
1 answer
28 views

how to get size of my image file store in DIRECTORY_Picture

I am implementing an app using camera to capture photo . But the camera is capturing even if i don't click , and saving it in the Picture Directory . Photos captured without clicking are saved in hte ...
Patrick Renaud's user avatar
0 votes
1 answer
132 views

ByteBuffer convert Bitmap crash

Hi I wanna convert byte array to bitmap and show image in a ImageView. I wrote the following code but I got exception that says that the buffer not large enough for pixels. Image resolution : 480*640 ...
Terry's user avatar
  • 1
0 votes
1 answer
127 views

Get PDF of RecyclerView/Bitmap

I want to create a Pdf from Recyclerview. I was able to get an image of a recyclerview before. I first obtained a bitmap and then converted it to an image. But I couldn't find the correct way to ...
burhanyaprak's user avatar
1 vote
1 answer
35 views

Convert image from gallery to bitmap. I get a NullPointerException

I'm trying to convert an image from the gallery into a bitmp and then store it in an array. Previously, however, I am getting a NullPointerException. How can I convert the image from the gallery? ...
Captai-N's user avatar
  • 1,228
0 votes
1 answer
93 views

How do I send bitmap data using intent to another screen and load it into a Image View in kotlin using .putExtra()?

I have searched online for a tutorial on how to send a bitmap data over to another activity using the putExtra() method in kotlin, but nothing seems to pop up. I do not know how to code in java so all ...
Sohum S's user avatar
2 votes
1 answer
64 views

WearOS Icon from Bitmap doesn't display color

I have a Compose layout that creates a Bitmap/Canvas and draws two colored rectangles to it. However, when drawn (both on an emulator and an actual device), the rectangles show as white. Here's the ...
Peter's user avatar
  • 1,411
0 votes
0 answers
69 views

How to make bitmap bigger without resizing the actual image

I am using Pax A920 device. I have an issue when printing a bitmap, there is no option to center the bitmap(image) documentation Methods reference: The issue is when the bitmap's width is short, its ...
NicoTing's user avatar
1 vote
1 answer
691 views

How to load bitmap Images in a List faster, Using jetpack compose Android

I am trying to load a list of object in a column using jetpack compose. The problem is the image is making screen lag. Here's my code - single list item composable function. fun ...
Deep Mashru's user avatar
1 vote
0 answers
46 views

Android. Is it possible get cached bitmap with glide?

Is it possible to get cached bitmap by key with glide like in coil ? For example my code with coil: val bitmap = imageLoader.memoryCache?.get(cacheKey) as? Bitmap? And my request to show page: val ...
testivanivan's user avatar
  • 1,124

1
2 3 4 5
36