Package com.adobe.dp.epub.opf

Examples of com.adobe.dp.epub.opf.BitmapImageResource


      body2.add(paragraph2);

      // add a bitmap resource
      DataSource dataSource = new ResourceDataSource(HelloEPUB3.class,
          "cassini.jpg");
      BitmapImageResource imageResource = epub.createBitmapImageResource(
          "OPS/images/cassini.jpg", "image/jpeg", dataSource);

      // add a bitmap image
      Element container = chapter2Doc.createElement("p");
      container.setClassName("container");
View Full Code Here


                    }
                }
                if(content!=null){
                    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);
                   
View Full Code Here

TOP

Related Classes of com.adobe.dp.epub.opf.BitmapImageResource

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.