bitmapfactory Questions

1

I am getting preview data from camera. It is in NV21 format. I want to save the preview to SD Card i.e in bitmap. My code is getting image and saving it, but in the gallery it is not captured previ...
Coastland asked 2/9, 2014 at 10:8

2

Solved

I am trying to decode base64 encoded string into bitmap in android. The encoded string will start with "image/jpeg;base64," I use the following method: public static Bitmap decodeBase64(String ...
Heligoland asked 11/5, 2015 at 12:5

2

I am using the following method to pull a PNG file from the assets folder in my Android application: public static Bitmap getBitmapFromAssets(Context context, String fileName) { try { AssetManag...

2

Solved

Im a beginner programmer, and my question is: Which image format shall i use for my android app? Descripton: I only use illustrations, so the images are mostly background images, and some bu...
Veronikaveronike asked 8/11, 2011 at 8:58

2

Solved

Hello I have this piece of code: EDIT: imageName = data.getData(); try{ InputStream stream = getContentResolver().openInputStream(imageName); BitmapFactory.Options options = new BitmapFactory...
Luetic asked 2/10, 2014 at 18:57

3

Solved

I need to change background of the action bar to a customized image, but every time I try to use this code it does not change a thing. Bitmap b = BitmapFactory.decodeResource(getResources(), R.dra...
Assertion asked 31/12, 2012 at 16:52

3

Solved

I have a loaded Bitmap which I would like to convert to set the config to Bitmap.Config.RGB_565. Is there a simple way of converting a Bitmap to this configuration after the Bitmap is already loade...
Artel asked 25/2, 2013 at 1:43

1

Solved

If you have a Uri and you need the Bitmap, you could theoretically do this Bitmap troublinglyLargeBmp = MediaStore.Images.Media.getBitmap( State.mainActivity.getContentResolver(), theUri ); bu...
Langur asked 10/6, 2014 at 7:39

2

Solved

I have an image that is 120x120px located in my /res/drawable/ directory. This is the size required for all devices. To load this Bitmap, I am using the following: Bitmap tmpBmp = BitmapFactory.d...
Pacification asked 13/4, 2014 at 20:1

1

I'm trying to better understand how Android handle images in order to use memory more efficiently. I have an image stored in the Bitmap and I'm using ImageView.setImageBitmap() to display it. Now t...
Stroboscope asked 29/10, 2011 at 12:4

5

I'm having some difficulty with regards to placing the contents of a Canvas into a Bitmap. When I attempt to do this, the file gets written with a file size of around 5.80KB but it appears to be co...
Valvular asked 21/2, 2013 at 11:46

4

Solved

Hi I've been trying to write Numbers on Imageview. Images for N number of questions. If the user entered answer is correct, then it should be displayed with question number with tick mark image els...
Crowbar asked 23/7, 2013 at 12:8

5

Solved

I've encountered a situation where I have to display images in a slideshow that switches image very fast. The sheer number of images makes me want to store the JPEG data in memory and decode them w...
Tanaka asked 15/3, 2013 at 13:5

2

getHolder().setFormat(PixelFormat.RGBA_888); Options options = new BitmapFactory.Options(); options.inDither=true; options.inScaled = true; options.inPreferredConfig = Bitmap.Config.ARGB_...
Anticlinal asked 2/3, 2013 at 18:34

2

Solved

Edit: When I save those bytes in the txt file and when I save it as png file , it shows the image, but it is not working here why...? I am using this code to create image from byte array on doInBa...
Stevestevedore asked 4/2, 2013 at 6:48

2

Solved

I have ViewPager which I use to show zoomable images (using ImageViewTouch). I need to load large bitmaps from Internet (http). By large I mean 2000x1000. The images need to be so large, because th...
Compressive asked 3/2, 2013 at 15:39

1

Solved

I need to get the height and width of the image found in the inputstream. Here is what I did: private Boolean testSize(InputStream inputStream){ BitmapFactory.Options Bitmp_Options = new BitmapFa...
Overwind asked 26/6, 2012 at 18:25

2

Solved

SOLUTION Thanks to @ChandraSekhar's suggestions the issue was that I was passing in an Immutable Bitmap to the canvas constructor. The solution is to create a copy of it when using BitmapFactory.d...
Abutilon asked 4/6, 2012 at 13:27

2

Solved

I'm making several calls to BitmapFactory.decodeFile() and BitmapFactory.decodeResource(), and I'd like to specify the format the bitmaps are decoded to, such as RGB_565 or RGBA_8888. Currently, t...
Corium asked 25/6, 2011 at 20:3

1

When I am using copyPixelsFromBuffer and copyPixelsToBuffer, the bitmap is not displaying as the same one, I have tried below code: Bitmap bm = BitmapFactory.decodeByteArray(a, 0, a.length); int[]...
Apery asked 1/4, 2012 at 11:51

1

Solved

I'm displaying an external image in an image view by fist downloading it like this: bitmap = BitmapFactory.decodeStream((InputStream)new URL(url).getContent()); Then setting this bitmap to the I...
Karbala asked 22/2, 2012 at 0:38

3

Solved

I want to decode an image from the SD card with BitmapFactory.decodeFile(path, options). I also want images that are larger than 2048x2048 pixels to be scaled down to at most 2048x2048 (maintaining...
Middleclass asked 20/2, 2012 at 12:17

2

Possible Duplicate: Bitmap byte-size after decoding? Is there anyway so I can get the size of this Bitmap?I've tried to use getByteCount() but I can't use it? Bitmap bitmap = BitmapF...
Busybody asked 26/7, 2011 at 17:14

3

Solved

I'm developing an Android application, and it's view is containing multiple Gallerys. The content of the Gallerys (the Bitmaps) are red from the Internet. For the first gallery, everything works ...
Thordia asked 9/5, 2011 at 17:41

2

Solved

I'm trying to decode a jpeg that is in CMYK color format. BitmapFactory returns null. I googled around but with no luck. Is it possibile Android team did not the right job supporting all kind of co...
Chak asked 30/9, 2011 at 9:34

© 2022 - 2024 — McMap. All rights reserved.