I need to use a specific png to create a bitmap. This bitmap must contain the EXACT values of my png. When loading it with BitmapFactory.decodeResource() the values get altered. I tried openRawResource and put my png in drawable/raw folder. I do not intend to draw that picture. The only thing in need to do is using that bitmap for getPixel requests.
Why are the bitmap values still altered?
Try creating a folder called
res/drawable-nodpiand place your .png file in that.From the Android Supporting Multiple Screens documentation:
“If you have some drawable resources that the system should never scale (perhaps because you perform some adjustments to the image yourself at runtime), you should place them in a directory with the nodpi configuration qualifier. Resources with this qualifier are considered density-agnostic and the system will not scale them.”