Questions tagged [bitmapregiondecoder]

10 questions
13
votes
4 answers

Why do I NOT get an out of memory exception?

I have a high resolution image (2588*1603) in drawable folder. If I use below code (1) to set it for the imageView I do not get OOM exception and the image assigned as expected: public class MainActivity extends ActionBarActivity{ private…
mmlooloo
  • 18,937
  • 5
  • 45
  • 64
5
votes
2 answers

Decode specific areas of image in Bitmapfactory?

I'm working with GeoTiff/PNG files too large for handling as a whole in my code. Is there any possibility to decode specific areas (e.g. given by two x,y coordinates) of a file in bitmapfactory? Haven't found anything looking similar at…
Peter K.
  • 93
  • 10
3
votes
0 answers

using the BitmapRegionDecoder when there is also a matrix

using the BitmapRegionDecoder to decode partial areas works fine in the general use. however, i've come to a piece of code where i had to replace the creation of a bitmap by using a BitmapRegionDecoder , but here's the catch: the creation of the new…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
2
votes
0 answers

BitmapRegionDecoder - inverse usage to build together a new image

I want to make a crop function with no quality loss. Therefore I load an image in a lower quality and reload parts of the image with the BitmapRegionDecoder to display tiles in a good resolution. So far so good, displaying is working fine like…
prom85
  • 16,896
  • 17
  • 122
  • 242
2
votes
2 answers

Images loaded with BitmapRegionDecoder are ok on simulator, but too large on device

In a simple word game app I load 26 letter tile images from a PNG-image stripe with the following code: private static final CharacterIterator ABC = new StringCharacterIterator("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); private static HashMap
1
vote
0 answers

BitmapRegionDecoder reading OBB using APK Expansion ZIP Library

I'm trying to read a bitmap from an OBB file using BitmapRegionDecoder together with the APK expansion Zip Library as follows. ZipResourceFile expansionFile = APKExpansionSupport.getAPKExpansionZipFile(cont,1, 1); AssetFileDescriptor…
larix
  • 11
  • 2
0
votes
0 answers

Android ImageDecoder extremely slow performance with HEIC/HEIF images

I'm using subsampling-scale-image-view to display images, and I implemented function like the Gallery app usually do (allow user to view image, zoom then and swipe left or right to switch between images). I found out that when I swipe to change…
Hhry
  • 823
  • 1
  • 8
  • 19
0
votes
1 answer

Rubbish drawn instead of transparent color when using BitmapRegionDecoder

So, simple task: I have a big picture, which has transparent parts. I want to decode rectangle part of it as a bitmap using BitmapRegionDecoder method decodeRegion. While non-transparent parts of picture are decoded well, I get some crap instead of…
Andy Silver
  • 155
  • 3
  • 8
0
votes
1 answer

Loading 26 letter images from a PNG stripe using BitmapRegionDecoder

In a word game app I am trying to load 26 letter tiles from a 6205 x 240 PNG image: private Paint mPaint = new Paint(Paint.FILTER_BITMAP_FLAG); mStripe = BitmapFactory.decodeResource( context.getResources(), R.drawable.big_english); int h =…
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
0
votes
1 answer

BitmapRegionDecode.decodeRegion, skia error when trying to create tile from bitmap

Hi i get a error skia: --- decoder->decodeRegion returned false when I try to decode a second region with BitmapRegionDeocde.decodeRegion. I manage to get the first region bitmap, but if get null for the second region. How can I manage to get the…
Kowlown
  • 920
  • 10
  • 26