I have an Android app in which I need to download text from a website, convert it to a raster image format and display it on the LED panel.
I am struggling with bitmap conversion.
Tried to use the following:
Bitmap mybitmap = Bitmap.createBitmap(100, 16, Bitmap.Config.ALPHA_8); Canvas c = new Canvas(mybitmap); c.drawText("0", 0, 0, paint);
But it does not seem to work. Any suggestions?
Update:
The Paint object is initialized as follows:
Paint paint = new Paint(); paint.setStyle(Paint.Style.FILL); paint.setColor(Color.RED); paint.setTextSize(16); paint.setAntiAlias(true); paint.setTypeface(Typeface.MONOSPACE);
Neha
source share