Remove base64 decoding/encoding from whiteboard plugin as this must be done in the protocol.

cusax-fix
Damian Minkov 18 years ago
parent a6727b8828
commit e502e2c736

@ -91,9 +91,7 @@ public WhiteboardObjectImageJabberImpl (String xml)
this.setWhiteboardPoint (new WhiteboardPoint (x, y));
this.setWidth (width);
this.setHeight (height);
byte[] b = img.getBytes ();
img = new String (Base64.decode (b));
this.setBackgroundImage ( img.getBytes ());
this.setBackgroundImage(Base64.decode(img));
}
}
catch (ParserConfigurationException ex)

@ -15,7 +15,6 @@
import java.awt.geom.*;
import java.util.List;
import net.java.sip.communicator.service.protocol.whiteboardobjects.*;
import net.java.sip.communicator.util.Base64;
/**
* a WhiteboardShapeCircle, in XML :
@ -78,7 +77,7 @@ public WhiteboardShapeImage ( String id,
this.whiteboardPoint = p;
this.width = width;
this.height = height;
this.bytes = Base64.decode(bytes);
this.bytes = bytes;
ImageIcon ii = new ImageIcon (this.bytes);
this.image = ii.getImage ();
@ -303,7 +302,7 @@ public void setWhiteboardPoint (WhiteboardPoint whiteboardPoint)
*/
public void setBackgroundImage (byte[] background)
{
this.bytes = Base64.decode(background);
this.bytes = background;
ImageIcon ii = new ImageIcon (this.bytes);
this.image = ii.getImage ();
}
@ -317,7 +316,7 @@ public void setBackgroundImage (byte[] background)
*/
public byte[] getBackgroundImage ()
{
return Base64.encode (bytes);
return bytes;
}
/**

Loading…
Cancel
Save