4 Replies Latest reply: Jun 19, 2012 5:48 AM by EJP RSS

    Problem 4 Base64 for decoding on Windows for encoded image of Linux

    943540
      //Server code to get Image on Linux environment
      String strInputImage = getTiffImageInString(); // get Tiff Image
      byte[] decodedBytes = Base64.decodeBase64(strInputImage.getBytes());
      String strTiffImage = getImageAsString(); // get tiff Image as string after processing to convert multi page Image
      String strOutputImage = Base64.encodeBase64String(strImage.getBytes());

      //Client code to get Image on Windows environment
      String strImageFromServer = getTiffImageFromServer(); // get Tiff Image from Server
      byte[] decodedBytes = Base64.decodeBase64(strImageFromServer.getBytes());
      saveTiffImage(decodedBytes);// save on disk

      When I try to get encoded image of Linux sever on Windows client it gives error as:
      Error: Cannot decode the image for the type :
      Occurs in: com.sun.media.jai.opimage.CodecRIFUtil
      java.io.EOFException
           at com.sun.media.jai.codec.SeekableStream.readShort(SeekableStream.java:439)

      Edited by: 940537 on Jun 17, 2012 1:51 PM