byte array to image in java

The below code will demonstrate the following.

Paint byte array to image in java
Draw byte array to image in java

MediaTracker mt = new MediaTracker(this);
//myArrayImage is a byte array to be painted
Image img = Toolkit.getDefaultToolkit().createImage(myArrayImage);
mt.addImage(img,0);
setSize(650,491);
setVisible(true);

No comments:

Post a Comment