aryarohit07 / PicassoFaceDetectionTransformation

A memory efficient Android image transformation library providing cropping above Face Detection (Face Centering) for Picasso.
846 stars 98 forks source link

android.content.res.Resources$NotFoundException: Resource ID #0xc8 #3

Closed aishwarya080416 closed 7 years ago

aishwarya080416 commented 7 years ago

Hey, I am getting the error mentioned in the question.

Picasso.with(this) .load(url) .fit() .centerInside() .transform(new FaceCenterCrop(200, 200, FaceCenterCrop.DP)) .into(ivOne);

I don't get the error if I comment the .transform(...) line.

aryarohit07 commented 7 years ago

If you are trying to use DP instead of Pixel then you will have to enter resource id. Something like this: new FaceCenterCrop(R.dimen.some_value, R.dimen.some_other_value, FaceCenterCrop.DP)

aishwarya080416 commented 7 years ago

Thank you! Working perfectly! :)