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
1 answer

How to re-scale Bitmap image size?

Hi guys I am trying to load a image from a url and after loading that i am trying to re scale it such that it fits the whole screen after that the text and the buttons present are available below the image which are wrapped around using scroll view…
New
  • 3
  • 5
0
votes
2 answers

Writing and reading a camera image to a file in local storage in Android

I want to hide the snap taken from the Camera application of device and save it in local storage so that it will not seen in Gallery or any other photo media sharing application. I had done that part. But in file explorer I can see my snaps at…
Sunny Bansal
  • 574
  • 1
  • 4
  • 12
0
votes
1 answer

android - loading multiple bitmaps with Picasso issues

I am trying to load multiple bitmaps from url using Picasso, and draw the bitmaps I load on my google map. all of this code is in a google MapFragment. public void drawLocations(final UserPictureUrl[] userPicsArray) { for (int j = 0; j <…
Ofek Agmon
  • 5,040
  • 14
  • 57
  • 101
0
votes
1 answer

Adding BitMap Resource to Paint Object in Android

I have a Pain Object that I want to overlay a Bitmap from Android resources. public static Paint createPaint(int color, int strokeWidth, Style style) { Paint paint = AndroidGraphicFactory.INSTANCE.createPaint(); paint.setColor(color); …
user914425
  • 16,303
  • 4
  • 30
  • 41
0
votes
1 answer

Android create bitmap from drawingcache for view bigger than screen

I am using Bitmap b = Bitmap.createBitmap(mView.getDrawingCache()); for creating image from my view so I can than share it. It works perfectly but when mView is bigger then the phone screen I get a null pointer exeption: …
Tadej Vengust
  • 1,351
  • 4
  • 18
  • 35
0
votes
0 answers

Drawing bitmaps to an image view with 30 FPS

I am working on android app which takes frames from the camera and display on surface view, I am using camera callbacks to get raw images and then convert it to byte stream and passes to the server for processing and then server return same frame.…
Sunil Soni
  • 443
  • 3
  • 18
0
votes
0 answers

Cropping a bitmap without converting into an image file

I am loading an image from Gallery as bitmap - on to a canvas and performing some drawings on it. At any point in time I have this bitmap containing my drawings, readily available. I have a requirement to crop this bitmap. For this I need to convert…
user264953
  • 1,837
  • 8
  • 37
  • 63
0
votes
0 answers

Capturing the current activity screen on android

I am trying to capture the screen of the current activity so that I can use android's share sheet to share the image. My activity contains a map fragment and TextViews. Everything I have tried captures a screenshot with a grid (which appears black…
0
votes
0 answers

Android studio: "unfortunately, app has stopped"

i have no idea how this is not working. i checked all of the xml files i have created and the java files and there is no error in any of them as far as i know. package com.example.jam7733.myapplication; import android.content.Intent; import…
Jordan Morse
  • 17
  • 1
  • 4
0
votes
1 answer

inSampleSize vs createScaledBitmap?

AFAIK, the inSampleSize attribute of BitmapFactory.options will read a sampled image as per the inSampleSize value. Eg: If value is 4, it will effectively read 1/16 pixels and thus memory required to load it will drastically reduce. Here in fact, it…
Sumit Trehan
  • 3,985
  • 3
  • 27
  • 42
0
votes
2 answers

Circular bitmap with Universal Image Loader

We are showing a notification with a large icon get from an URL. So, in order to load the image we are using Universal Image Loader with the following code: mImageLoader.loadImage(imagePath, new SimpleImageLoadingListener() { @Override …
FVod
  • 2,245
  • 5
  • 25
  • 52
0
votes
2 answers

Unable to load image in a ImageView from the Internal Storage

I am trying to add the Image from the the Internal Memory. I am trying to use this code for that ImageView message_image=(ImageView)v.findViewById(R.id.message_image); File imgFile = new File(img_db); …
0
votes
2 answers

Universal Image Loader and BitmapDrawable

We have an image in B64, an we want to use that image as loading image in Universal Image Loader while a better image isn't loaded from an url. So we create a bitmap from that url in b64 and convert it into a BitmapDrawable. The result is shown fine…
FVod
  • 2,245
  • 5
  • 25
  • 52
0
votes
1 answer

android Change the dpi of a Bitmap image canvas

In my code, I have an image that convert bitmap, change the size and assigned a setDensity. Then I save in sd. In this example, the final size would be 5x7 inches This is my code: private void SaveImage(Bitmap myBitmap) { int TARGET_DENSITY…
Sergio76
  • 3,835
  • 16
  • 61
  • 88
0
votes
1 answer

Android OutOfMemory error in Fragment onSaveInstanceState

I have a Fragment with RecyclerView, which holds items with ImageView (basically like gallery app). Images are displayed using async task to do the work in separate thread. Images are displayed from base64 encoded string. Images are also cached with…