svn commit: r3322 - trunk/src/net/java/sip/communicator: impl/protocol/jabber/extensions/whiteboard plugin/whiteboard/gui/whiteboardshapes

damencho at dev.java.net damencho at dev.java.net
Wed Dec 19 23:04:39 CET 2007


Author: damencho
Date: 2007-12-19 22:04:38+0000
New Revision: 3322

Modified:
   trunk/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java
   trunk/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java

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

Modified: trunk/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java?view=diff&rev=3322&p1=trunk/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java&p2=trunk/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java&r1=3321&r2=3322
==============================================================================
--- trunk/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java	(original)
+++ trunk/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java	2007-12-19 22:04:38+0000
@@ -91,9 +91,7 @@
                 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)

Modified: trunk/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java?view=diff&rev=3322&p1=trunk/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java&p2=trunk/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java&r1=3321&r2=3322
==============================================================================
--- trunk/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java	(original)
+++ trunk/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShapeImage.java	2007-12-19 22:04:38+0000
@@ -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 @@
         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 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 byte[] getBackgroundImage ()
     {
-        return Base64.encode (bytes);
+        return bytes;
     }
 
     /**

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: commits-help at sip-communicator.dev.java.net





More information about the commits mailing list