Image.setTransparentColor() doesn't work on device
I am trying to create transparent images. Really they are electronic signatures using the Whiteboard class. It works fine on the desktop app to save the image with the transparent background. The transparent background doesn't work on my android devices. I'm using the following code:
****SETUP THE WHITEBOARD
wtbPaint = new Whiteboard();
wtbPaint.transparentBackground = true;
// wtbPaint.setBackColor(Color.WHITE); // Make no difference because my window is white
wtbPaint.thick = true;
c.add(wtbPaint, LEFT, AFTER, SCREENSIZE, PREFERRED);
****SAVE THE RESULTS TO A FILE
Filename = SigningObject.getName() + "." + id + "." + PropertyName + "." + DateType.getTimestampString() + ".png"; File f = new File(dirName + "/" + Filename, File.CREATE_EMPTY); wtbPaint.getImage().setTransparentColor(Color.WHITE).createPng(f); int s = f.getSize(); f.close();
I have attached the saved file for when it is run on the desktop and tablet:
Both files are generated using the same code. In the Desktop file the transparency is working which is what I want. In the Tablet file the transparency is not working which is broken and I need to get fixed.
Let me know what I can do to fix this. Thanks Alex.