I am trying to extract a bitmap from resources, add a text message to it and return it to the calling method. It seemed that Canvas could be a method, but the code below does not work.
public Bitmap annotateBmp(String storyId) { Bitmap b = BitmapFactory.decodeResource(m_Context.getResources(), R.drawable.candle_android_pin_512); Canvas c = new Canvas(b); Paint p = new Paint(); p.setColor(R.color.red); c.drawText("Do you see this?", 30, 210, p); return b;
Am I missing a step or is there a better method?
source share