Package com.adobe.dp.epub.ops

Examples of com.adobe.dp.epub.ops.ImageElement


      // add a bitmap image
      Element container = chapter2Doc.createElement("p");
      container.setClassName("container");
      body2.add(container);
      ImageElement bitmap = chapter2Doc.createImageElement("img");
      bitmap.setClassName("bitmap");
      bitmap.setImageResource(imageResource);
      container.add(bitmap);

      // and another paragraph
      Element paragraph3 = chapter2Doc.createElement("p");
      StringBuffer sb3 = new StringBuffer();
View Full Code Here


                    DataSource dataSource = new ByteArrayImageDataSource(content);
   
                    BitmapImageResource imageResource = getEpub().createBitmapImageResource(
                            "OPS/images/" + System.currentTimeMillis() + (Math.random() * 100) + "." + ext, mimetype,
                            dataSource);
                    ImageElement bitmap = dstResource.getDocument().createImageElement("img");
                    bitmap.setImageResource(imageResource);
                   
                    dstElem.add(bitmap);
                   
                    return imageResource;
                }
View Full Code Here

TOP

Related Classes of com.adobe.dp.epub.ops.ImageElement

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.