Access to a ressource in Android application -
i have tried use gpuimage android. issue not related gpuimage happens @ moment. i'm trying build image filter using image overlay on original image.
gpuimagecolordodgeblendfilter tmp = new gpuimagecolordodgeblendfilter(); tmp.setbitmap(bitmapfactory.decoderesource(context.getresources(), r.drawable.hipster));
my issue need access file called hipster.png located in res/drawable/hipster.png
i avoid using decoderesource because image same , i'm want avoid using context filter class builtin inside lib aar , reuse in app.
any idea ?
i have tried use context coming activity it's crashing , think context useless in case
thanks
hi seb tell how it. difference use context, pass parameter in parts of code , don't have problem.
getresources().getidentifier(<nameofimage>, "drawable", getpackagename())
hope helps!
Comments
Post a Comment