and now..
I explain that how to convert bitmap instance to byte array and byte array to bitmap instance.
you can do easier that the following code.
1. bitmap to byte
example)
[sourcecode language="java"]
public byte[] bitmapToByteArray(Bitmap b) {
ByteArrayOutputStream stream = new ByteArrayOutputStream() ;
b.compress(CompressFormat.PNG, 100, stream) ;
byte[] byteArray = stream.toByteArray() ;
return byteArray ;
}
[/sourcecode]
After we create a instance of ByteArrayOutputStream, through compress method of Bitmap we get the compressed bimap out.
2. byte to bitmap
[sourcecode language="java"]
public Bitmap byteArrayToBitmap(byte[] byteArray) {  
Bitmap bitmap = BitmapFactory.decodeByteArray(byteArray, 0,byteArray.length
 ) ; 
return bitmap ;  

[/sourcecode]