alierqul / beginning-android-games

Automatically exported from code.google.com/p/beginning-android-games
0 stars 0 forks source link

[Chapter 5] Unused Options in newPixmap(String, PixmapFormat) method #25

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the printed version of the book, in the sub-section "AndroidGraphics: 
Serving Our Drawing Needs", chapter 5, page 217, listing 5-12 implements 
newPixmap(String, PixmapFormat) with a little inaccuracy.

The method sets an instance of BitmapFactory.Options, but it isn't passed in 
the BitmapFactory.decodeStream() static call.

I think that correct code is:
bitmap = BitmapFactory.decodeStream(in, null, options);

instead of:
bitmap = BitmapFactory.decodeStream(in);

--- Alessandro Dal Bello ---

Original issue reported on code.google.com by alessand...@gmail.com on 21 Aug 2011 at 2:37

GoogleCodeExporter commented 8 years ago
You are correct. Thanks for your continued issue reporting!

Original comment by badlogicgames on 24 Aug 2011 at 4:14

GoogleCodeExporter commented 8 years ago
Fixed in second revision!

Original comment by badlogicgames on 6 Sep 2011 at 1:39