Package net.sourceforge.rtf.context.image

Examples of net.sourceforge.rtf.context.image.FormatBase$FormatJPG


            IOUtils.closeQuietly(in);
        }
        StringBuffer buf = new StringBuffer("");
        if (imagedata != null) {
          // Test if image date is image
          FormatBase imageformat = FormatBase.determineFormat(imagedata);
            if (!(imageformat.getType() == ImageConstants.I_NOT_SUPPORTED
                    | imageformat.getRtfTag() == "")) {
  

             
             
             
            buf = new StringBuffer(imagedata.length * 3);
         
            for (int i = 0; i < imagedata.length; i++) {
                int iData = imagedata [i];
   
                // Make positive byte
                if (iData < 0) {
                    iData += 256;
                }
   
                if (iData < 16) {
                    // Set leading zero and append
                    buf.append('0');
                }
   
                buf.append(Integer.toHexString(iData));
            }
           
           
            buf.insert(0, "{\\*\\shppict{\\pict\\" + imageformat.getRtfTag() + " ");
            buf.append("}");
            buf.append("}");
           
            }
View Full Code Here

TOP

Related Classes of net.sourceforge.rtf.context.image.FormatBase$FormatJPG

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.