Questions tagged [android-bitmap]

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

Use android.graphics.Bitmap to create an immutable bitmap image for Android.

Android supports bitmap files in three formats:

  1. .png (preferred),
  2. .jpg (acceptable),
  3. .gif (discouraged).

To find more information :

1782 questions
0
votes
0 answers

Sending the output Mediaprojection API android through Socket

I want to share screen of the android with pc through Socket, the version of android don't matter. What i found after a lot of search: MediaProjection.createVirtualDisplay to ImageReader to Bitmap and send it through Socket Network. What do you…
0
votes
1 answer

Resize a bitmap in android - OutOfMemoryError exception

I try to re-size a bitmap, but sometimes i got an OutOfMemoryError crash. Think that this line is the problem: Bitmap.createBitmap(bm, 0, 0, width, height, matrix, false); this is the function: public static Bitmap…
0
votes
1 answer

setImageBitmap Error, ImageView call OutOfMemory

Project with error on GitHub: https://github.com/MediaPortal1/HowToDraw/blob/master/app/src/main/java/com/poltavets/app/ I had method img.setImageResources(R.id.image) in my project, but it offten call OutOfmemory when i use this method often or…
MediaPortal
  • 175
  • 6
0
votes
0 answers

Is there a way to getPixel(x,y) without a bitmap?

Hi everyone. So I asked a question about custom shaped buttons yesterday and it got downvoted. I have done more research since and I think I'm ready to ask something more specific. Basically, I need to turn each portion of this pie into a button.…
0
votes
1 answer

How can I get the view object from resource ID in appium?

I am using appium for the testing automation. I need the view object to store into bitmap the current app screen. public Bitmap takeScreenShot(View view) { view.setDrawingCacheEnabled(true); …
Gsquare
  • 689
  • 1
  • 5
  • 18
0
votes
3 answers

Permanently Populate ListView With images?

I'm currently developing an app where I have a listview. This listview is populated with text and images fetched from a XML file online. It's populating correctly however, whenever you scroll, anything that wasn't currently on the screen reloads and…
MattyK14
  • 2,046
  • 2
  • 17
  • 29
0
votes
1 answer

BitmapFactory's decodeFile returns null

This is a simplified version of my code. I get two screenshot of the app screen and store in first.png and sec.png which I can see is located in the app\src folder. I can open the images and see that they are correct screenshots. However when I try…
Gsquare
  • 689
  • 1
  • 5
  • 18
0
votes
0 answers

Avoid bitmap scaling with different canvas size

I am trying to implement overlay transformation for Picasso library. So, I am loading image into image view and want to display overlay using bitmpap First of all I am fill canvas with transparent color Then I am trying to draw drawable over …
Georgy Gobozov
  • 13,633
  • 8
  • 72
  • 78
0
votes
2 answers

Android: Drawing circle on screen

I'm having trouble drawing a circle to the screen. I do not know if I'm approaching this correctly, or if I have to use a bitmap. Below is a Circle class I created for specifically creating a circle to my specifications. package…
Alex Cauthen
  • 497
  • 5
  • 12
  • 32
0
votes
0 answers

Displaying many pictures on an android app - OutofMemoryError

I'm trying to load a bunch of pictures associated with groups on my app. I use a recyclerview to show the group cardview's, but each cardview is supposed to show an associated thumbnail. The pictures, I guess, are too large to be stored in memory…
Riptyde4
  • 5,134
  • 8
  • 30
  • 57
0
votes
0 answers

Issue in retrieving same size image from phone storage to application activity

I have saved an image from activity1 to internal storage in png format with 960*960 dimensions, the size is 5.8kb. From gallery again retrieving the same 960*960 5.8kb image into activity2 of the same app. Now when I save the same image from this…
Aalap Patel
  • 2,058
  • 2
  • 17
  • 31
0
votes
1 answer

How can I load Images from the Gallery by URIs stored in the db without permission denial

I'm currently creating my own gallery app. I use a custom object which holds all required information for a gallery including urls of the images from the local android gallery. public class GalleryDTO { private Long id; private String name; …
fsch
  • 201
  • 1
  • 5
  • 17
0
votes
3 answers

Android Crop Activity before setting image to imageView

Please help, I want an image crop activity before setting drawable to imageView. I want to set cropped image to imageView, selb is the same.. Here's my code public void picselect(View view) { Toast.makeText(this, "Select a Picture",…
0
votes
0 answers

How to implement erasing feature in a Paint-like application?

I have a custom view DrawingPanel and in I'm using this to make a paint application which lets you draw on image.I now want to add the erasing capability to make the image transparent.I've tried using mPaint.setXfermode(new…
zek54
  • 415
  • 3
  • 20
0
votes
0 answers

Why drawline() method cannot draw a line as exact co-ordinate that i passed?

I write this simple code for line drawing but problem is line start from somewhere. I need to start the line which co-ordinate i passed to the drawline() method. I cannot find why line get margin from left side. I have confusion. i need guideline…
Maulik Baraiya
  • 203
  • 3
  • 9