skgmn / RapidDecoder

Simplified bitmap decoding and scaling for Android
Apache License 2.0
261 stars 43 forks source link

Builtin decoder fails to decode big image #5

Closed SammyVimes closed 9 years ago

SammyVimes commented 9 years ago

Builtin decoder fails to decode this image (maybe because of it's size). It fails in JpegDecoder::begin

Image: https://cloud.githubusercontent.com/assets/4058545/5209351/a77fcaac-75ce-11e4-9705-ee42fa8710c1.jpg

skgmn commented 9 years ago

Would you show me your code too?

SammyVimes commented 9 years ago
BitmapLoader myBitmapLoader = BitmapDecoder.from(path, false).useBuiltInDecoder(true).config(Config.RGB_565);
myBitmapLoader.region(rect);
bitmap = myBitmapLoader.scaleBy(scale).decode(); //scale is 1/16 (0.0625) for this image and rect is the size of image. Changing rect and scale didn't fix it
skgmn commented 9 years ago

It was because of the image's height. There was a size limitation in the jpeg decoder used here and I haven't noticed it. It was ok after removing it. It'll be updated soon.