aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2007-12-19 22:04:38 +0000
committerDamian Minkov <damencho@jitsi.org>2007-12-19 22:04:38 +0000
commite502e2c7363246ffe99e263c58856a73636160c2 (patch)
tree950b0b0810919cf24e1d134e8bc9660d565062ff
parenta6727b88284a7facfafbf0c3d5726779f0141b5b (diff)
downloadjitsi-e502e2c7363246ffe99e263c58856a73636160c2.zip
jitsi-e502e2c7363246ffe99e263c58856a73636160c2.tar.gz
jitsi-e502e2c7363246ffe99e263c58856a73636160c2.tar.bz2
Remove base64 decoding/encoding from whiteboard plugin as this must be done in the protocol.
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java4
-rw-r--r--src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java7
2 files changed, 4 insertions, 7 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java
index 00a3ae1..8d7cad6 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java
@@ -91,9 +91,7 @@ public class WhiteboardObjectImageJabberImpl
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)
diff --git a/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java b/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java
index bc73256..1ddcfd4 100644
--- a/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java
+++ b/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java
@@ -15,7 +15,6 @@ import net.java.sip.communicator.service.protocol.WhiteboardPoint;
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 class WhiteboardShapeImage
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 class WhiteboardShapeImage
*/
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 class WhiteboardShapeImage
*/
public byte[] getBackgroundImage ()
{
- return Base64.encode (bytes);
+ return bytes;
}
/**