Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

I'm trying to draw a mipmap in a canvas using canvas.drawBitmap(BitmapFactory.decodeResource(getResources(), R.mipmap.keyb_style_02), 0, 1445, null); On a XHDPI screen it works On a XXHDPI screen, the ...
gigi38660's user avatar
1 vote
0 answers
58 views

For a long time I've been using Picasso to load images into my ImageView. I noticed that on newer devices (Android 35+) the behaviour of BitmapFactory.decodeStream() has changed to now return null for ...
alexgophermix's user avatar
0 votes
0 answers
318 views

I am using byte[] to Bitmap to print tickets on a printer in image form. However, the printed receipt shows only a line instead of the image. Can anyone help where the code is wrong? var img = ...
Nvn's user avatar
  • 5
0 votes
0 answers
154 views

I have an app that reads and enhances photos. Recently I (forced by Google) updated my app to use sdk 33. When I released it I began to get reports of errors. For these users it will not read any ...
Jon Harman's user avatar
0 votes
0 answers
83 views

when compressing image in working in oneplus and oppo android 13 5g Phone thowing error [enter image description here](https://i.sstatic.net/LkbS7.png) code : @RequiresApi(Build.VERSION_CODES.O) fun ...
SYED ABUTHAHIR's user avatar
1 vote
2 answers
93 views

I am trying to add an oval background to my text according to its size using Paint. There are a few problems in my code. I want to draw rectangle with round corners instead of the circles. Its size ...
Waqas K's user avatar
  • 164
2 votes
0 answers
199 views

I am using draw function in my app public void draw(Canvas canvas) { if (canvas != null) canvas.drawBitmap(animation.getImage(), x, y, null); } This function is further invoked in main ...
Radek Sołdek's user avatar
0 votes
1 answer
507 views

I'm making a little geography app where I wish to display a country's flag (svg). The flag image resources are online link (in svg format). Eg: Albania Flag - > https://flagcdn.com/al.svg This is ...
gab's user avatar
  • 35
0 votes
1 answer
86 views

I'm trying to send the POST API request to the Server like below and I'm getting the successful response code - 200, but when I try to decode the InputStream to Bitmap, then only the API requests get ...
Prasath S's user avatar
  • 3,614
0 votes
1 answer
122 views

when i create Bitmap Bitmap newBitmap = Bitmap.createBitmap(10, 10, Bitmap.Config.ARGB_8888); and edit pixels with Alfa (1-255) newBitmap.setPixel(0, 0, Color.argb(255, 50, 100, 250)); and save to ...
Гена's user avatar
  • 133
1 vote
0 answers
543 views

I'm working on an Android app where I have a byte array of a JPEG image and need to display it. Currently, I'm decoding it in Android with this code: Bitmap bitmap = BitmapFactory.decodeByteArray(...
gfrung4's user avatar
  • 1,760
0 votes
2 answers
1k views

I'm developing an Android app that receives an image via BluetoothSocket and I'm trying to retrieve its Bitmap by using the BitmapFactory.decodeStream() method, so something like: // Create ...
galligio's user avatar
0 votes
0 answers
55 views

My app loads alot of images as Mainscreen has recyclerview with images, and once user click on any item it would load more images in a new activity with it's own recyclerview. now cuz of these images ...
MiniDev99's user avatar
  • 334
0 votes
2 answers
273 views

using 3rd party library which returns a bitmap. in the app it would like to scale down the bitmap. static public Bitmap getResizedBitmap(Bitmap bm, int newWidth, int newHeight) { int width = ...
lannyf's user avatar
  • 11.1k
0 votes
1 answer
216 views

I am trying to convert Java code into c# So here is Java code BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 1; options.inPreferredConfig = Bitmap.Config.ARGB_8888;...
Mayur Asodariya's user avatar
0 votes
0 answers
112 views

I need to figure out a way to get a bitmap cropped without creating another bitmap that is already present. I have two bitmaps int width = 50; int height = 50; //Bitmap A bitmapA = Bitmap....
Jack Smother's user avatar
1 vote
0 answers
692 views

I'm trying to download an image from a URL by creating a Bitmap using bitmapFactory.decodeStream(InputStream) and then imageView.setImageBitmap(bitmap) but I am always getting this error: D/skia: --- ...
Vincent O'Luasa's user avatar
1 vote
1 answer
436 views

I am facing an issue now. Why Bitmap.decodeFile() method is returning null? I tried with the following advice. but the above advice doesn't help me. For directories reference Code: private File ...
KangDo's user avatar
  • 79
3 votes
1 answer
681 views

I am converting an android Image captured in my application to a bitmap. I am doing this by getting the image buffer from the pixel plane of the image and then using BitMapFactory to decode it into a ...
Birdfriender's user avatar
1 vote
1 answer
411 views

Newbie question. I have a byte array (of total length 1920 X 1080 X 4), with every 4 bytes holding constant alpha value of 0x80 (~ 50% translucency) and RGB triplet, I would like to convert it to a ...
Kurt's user avatar
  • 97
1 vote
1 answer
373 views

I'm trying to decode a drawable resource into a bitmap like below. BitmapFactory.Options options = new BitmapFactory.Options(); options.inScaled = true; int ...
Shashank Degloorkar's user avatar
0 votes
0 answers
113 views

camera.java final File file = new File(getExternalFilesDir(null) ,"/CCA_" + new SimpleDateFormat("yyyy-MM-dd_HHmmss", Locale.getDefault()).format(new Date()) + ".jpg"); ...
termite's user avatar
1 vote
1 answer
1k views

I have a small program that takes a Chair.jpg and converts it a bitmap. The reason for this is to change the color type of the pixels to the format of BGR_888 (which I got from this stack overflow ...
Nelly Yuki's user avatar
0 votes
0 answers
88 views

My app takes a picture then compresses if necessary. It gets an error on new s20 phones. BitmapFactory.Options scaleOptions = new BitmapFactory.Options(); scaleOptions.inJustDecodeBounds = true; ...
Azkik's user avatar
  • 85
0 votes
0 answers
42 views

I want to load image bytes into ImageView using BitmapFactory with this code: ImageView imageView = findViewById(R.id.photo_view); imageView.setImageBitmap(BitmapFactory.decodeByteArray(imgBytes, 0, ...
stackQA's user avatar
  • 16
0 votes
0 answers
46 views

I've list of png stored on my smartphones: image001.png, image002.png, ..., image175.png while each image is 200-250KB. I would like to draw them on canvas. Thus I guess I need to convert them to ...
Maor Cohen's user avatar
0 votes
0 answers
128 views

I have the following code: Bitmap bitmap = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_4444); for (int y = 0; y < HEIGHT; y++) { for (int x = 0; x < WIDTH; x++) { ...
toto_tata's user avatar
  • 15.6k
0 votes
1 answer
3k views

I started a new project in Android Studio with: empty activity, Java, API 29, Android 10.0 (Q) I added permissions to AndroidManifest.xml <uses-permission android:name="android.permission....
Mr.P.Panther's user avatar
0 votes
3 answers
547 views

I get a base64 string from the server, then I parse it to image, on Android side, the image is rotated to 270 degree, its width/height is exchanged than iOS side. Any idea? Thank you. Here is the code:...
Changwei's user avatar
  • 672
0 votes
1 answer
174 views

I am trying to obtain the dimensions of an image using its URI using the code below. However, for some images (photos taken by phone camera in the portrait mode - an example photo below) the obtained ...
Homam's user avatar
  • 63
0 votes
0 answers
32 views

I was trying to make a custom animation player by rapidly switching images and extending view, so I had to load the BitMaps into an array, the whole 142 images are only 2.4MB in size, and I even ...
horxCoder's user avatar
  • 175
0 votes
0 answers
147 views

Following is the code from the official Android documentation. https://developer.android.com/training/camera/photobasics private void setPic() { // Get the dimensions of the View int targetW = ...
D buiss's user avatar
  • 173
-1 votes
1 answer
2k views

I tried to take a picture from storage, and display it in ImageView using BitmapFactory.decodeFile but i found error unable to decode stream java.io.filenotfoundexception EACCES (Permission denied), i'...
Erlangga's user avatar
  • 131
0 votes
1 answer
10k views

I have a Spring Api with two methods: one of them return a List<byte[]> as a JSONArray, and another method that returns a byte[]. When I call Volley multipart request to return a byte[], I can ...
Raphael Carvalho's user avatar
0 votes
0 answers
287 views

I'm using BitmapFactory.decodeStream() to download images on a background thread. Here is the code: URL url = new URL("https://...."); final Bitmap image = BitmapFactory.decodeStream(myUrl....
Tarek Abed's user avatar
3 votes
1 answer
602 views

I have a jpg image of size 1080*1080 in my drawable folder, when I am storing it in a Bitmap variable the size of the bitmap is not showing as 1080*1080, it is showing based on the device I am using, ...
tushar's user avatar
  • 335
0 votes
1 answer
187 views

I have an image (1.84MB) to load and I want to load a smaller version of it to gain time, I also don't want to store a smaller version of it. For info, these files are located in a removable SD card, ...
Axel S.'s user avatar
1 vote
0 answers
413 views

I try to get bitmap to generate from the R.mipmap.ic_launcher_round val bitmap = BitmapFactory.decodeResource(resources, R.mipmap.ic_launcher_round) Why did it just return null?
Elye's user avatar
  • 61.3k
2 votes
2 answers
1k views

On an emulator running Android 10, when I use decodeFileDescriptor on a FireDescriptor as shown below, the bitmap is created fine. But when I try to set the options and then get the bitmap using that ...
Krishnan V S's user avatar
  • 1,166
1 vote
0 answers
167 views

I have an image that is saved in this place /data/user/0/com.package.name/files/3_20200302_1915403011639805937138468.jpg I want to load it in a bitmap as below val bitmap = BitmapFactory.decodeFile(...
james04's user avatar
  • 1,968
0 votes
2 answers
141 views

I created socket connection between Server and Android Client and sent Images as byte Array but I can't find a way to decode byte Array in android. Every time I try Image = BitmapFactory....
Dhruv Kansara's user avatar
0 votes
1 answer
935 views

Bitmap size is only 49 KB. I have permissions in my AndroidManifest: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android....
Member's user avatar
  • 87
0 votes
2 answers
153 views

I am designing an app which has to deal with large number of bitmaps with huge size from server. There are ways to decode Option 1: Create a buffered inputstream from image url Decode only the bounds ...
Android_Learner's user avatar
0 votes
3 answers
1k views

I am trying to take a photo using camera and then trying to save to gallery and decode the stream using BitmapFactory but it returns null and also photo taken is not saved to gallery. So two things ...
srisindhu saride's user avatar
0 votes
1 answer
683 views

I'm creating image upload from pick gallery to server. one week ago everything work fine, but today didn work and giving this error. java.lang.RuntimeException: Failure delivering result ResultInfo{...
Arif Nur Rohman's user avatar
0 votes
0 answers
113 views

I have the common problem of display a picture in the correct rotation. My images are stored on a server. I call an image and display it in my app. Each image is rotated. So I found a correction with ...
Mister Fisher's user avatar
-1 votes
1 answer
438 views

I realise this topic has many posts and I have used them to get this far but I feel I need a little extra to get over the hill as none of them demonstrate the use of arrays for this process. I am ...
Stitches S's user avatar
2 votes
0 answers
572 views

I successfully managed to create a pdf file using iTextSharp with a table inside it. I am trying to add in on top a letterhead image from inside the drawable folder I have tried to add it using ...
Duke Oettinger Dubs's user avatar
0 votes
0 answers
85 views

Good afternoon, I have the following code in Android for take a photo and show in ImageView, the file photo is in the path when I check with filemanager, but dont show in ImageView and have the ...
Jorge Zambrano's user avatar
0 votes
0 answers
123 views

I'm trying to make interactive bitmap animations using Bitmap Factory plugin for NativeScript. I use Vuejs template. Github repo: https://github.com/sylwesterdigital/nativescript-bitmapfactory-anims....
user2401543's user avatar
  • 1,159

1
2 3 4 5
13