Good day. My question is probably stupid, but I just can not figure it out. I need to do image decoding:
BitmapFactory.decodeFile( /* PATH TO PIC */, options); But my images are stored in an array (drawable):
public Integer[] myPics = { R.drawable.pic1, R.drawable.pic2, R.drawable.pic3, R.drawable.pic4, R.drawable.pic5, R.drawable.pic6, R.drawable.pic7, R.drawable.pic8, R.drawable.pic9, R.drawable.pic10, R.drawable.pic11, R.drawable.pic12, R.drawable.pic13, R.drawable.pic14, R.drawable.pic15, R.drawable.pic16, R.drawable.pic17, R.drawable.pic18, R.drawable.pic19, R.drawable.pic20, R.drawable.pic21 }; The decodeFile method in the first parameter receives only the string path. I tried to get an element from an array by position or element number, but all this does not fit. Actually a subject
* UPD tried through decode resources, but he also doesn’t want to work with decodeResource(mContext.getResources(), mThumbIds[path], options);