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

Parse.com retrieve list of images

Here is my class that works with parse.com API. public class ListActivity extends AppCompatActivity { RecyclerView recyclerView; LinearLayoutManager manager; List recipes; static int count = 0; private…
Void
  • 1,129
  • 1
  • 8
  • 21
0
votes
1 answer

Bitmap returns null when taking screenshot

I'm trying to get a screenshot from a fragment, but seems that when I do bitmap = view.getDrawingCache(); it returns null. Does anyone knows why is this happening and how can I fix this? here is my code: public void takeScreenshot(View view) { …
Darko Petkovski
  • 3,892
  • 13
  • 53
  • 117
0
votes
1 answer

Can I share BitMap as an image (PNG, JPG...) on Facebook, Twitter etc

I need to give the user possibility to share his high score. I took an image (PNG) and wrote the high score on it on it. Can I convert BitMap to PNG and share it without saving the file?
user5238167
  • 1
  • 1
  • 1
0
votes
1 answer

WebView: java.lang.IllegalArgumentException: width and height must be > 0

I get the error java.lang.IllegalArgumentException: width and height must be > 0 and I think this error may be caused by the webview. I am trying to display a rendered PDF file in a webview and there are some files which work fine but others launch…
0
votes
2 answers

Storing and loading images from the cache, images will store but wont load

I have function that download an image or set of images from the server and display them. This part works fine but I want to store them in the cache to save users data using the app. I have followed this to incorporate the caching process inside my…
0
votes
1 answer

Overlaying Bitmaps on Canvas in Android

I am using following code to draw bitmaps on top of each other. public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
Max Testing
  • 135
  • 2
  • 8
0
votes
1 answer

The orientation issue when save the EGL surface to a file in Android grafika open source code

I use the saveFrame method in grafika. But I found there is orientation issue. The left one is from saveFrame and the right one is what i see. The code as following: /** * Saves the EGL surface to a file. *

* Expects that this object's EGL…

Jerikc XIONG
  • 3,517
  • 5
  • 42
  • 71
0
votes
0 answers

How to set an image of an ImageView that's not in your contentView?

I can't seem to set the ImageView from a different layout. In the class below, I use one layout that has an ImageView, and I can set that ImageView to the image picked by the user from the gallery perfectly. But when I set an ImageView that's not in…
TheQ
  • 1,949
  • 10
  • 38
  • 63
0
votes
0 answers

Passing bitmap through intent (transaction error) vs. reloading it (OOM)

This is more of a design question. I have a MasterActivity showing a not-so-little preview of an image, and a DetailActivity that should show the image in fullscreen. Picture is retrieved from server using parse.com services and assigned to…
natario
  • 24,954
  • 17
  • 88
  • 158
0
votes
0 answers

Downloading Bitmap from URL not working

I have this simple code: public Bitmap getimg(String src){ try { Bitmap myBitmap; URL url = new URL(src); myBitmap = BitmapFactory.decodeStream(url.openConnection().getInputStream()); return myBitmap; }catch (IOException e) { …
EnderNicky
  • 323
  • 4
  • 14
0
votes
1 answer

java.lang.OutOfMemory Error - SD Card Image into ImageView

I am trying to show SD Card image into ImageView and getting OutOfMemory error. Please let me know How can i show SDCard's images into ImageView (no matter how big they are.) I know we can use, these properties to control on it, but i am looking for…
Sophie
  • 2,594
  • 10
  • 41
  • 75
0
votes
1 answer

Writing and reading file

I'm having a problem writing and reading files. Here goes the code: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode ==…
Progeny
  • 672
  • 1
  • 11
  • 25
0
votes
4 answers

Intent seems not sent between activity

I have wrote an app with 2 activities. One activity took a picture and the second one use it with some filters. Activity 1: Intent FilterSelectionIntent = new Intent(getActivity(),…
Seb
  • 2,929
  • 4
  • 30
  • 73
0
votes
1 answer

NullPointer Exception at android.content.ContentResolver.openInputStream

I want to set an image taken by my device camera on to an image view,When i do this ,the image is rotating .So i have tried this code ,But it throws a NullPointer Exception.I could not understand the problem ,can anyone help? …
0
votes
1 answer

how to upload image to server without converting to Base64 in Android?

I'm a newbie with android studio. I want to upload an image to a server without converting it into a base64 string. I don't know how to do this. Here is my code: //This is my code Bitmap bitmap =…
Tachchai
  • 1
  • 2
1 2 3
99
100