Examples of writeImage()


Examples of org.apache.xmlgraphics.image.writer.ImageWriter.writeImage()

                    + " loading problem.");
        }
        if (log.isDebugEnabled()) {
            log.debug("Writing image using " + writer.getClass().getName());
        }
        writer.writeImage(image, os, params);
    }

    /**
     * Returns the OutputStream corresponding to this page
     * @param pageNumber 0-based page number
View Full Code Here

Examples of org.apache.xmlgraphics.image.writer.ImageWriter.writeImage()

                }
            } finally {
                multiWriter.close();
            }
        } else {
            writer.writeImage((RenderedImage) pageImagesItr.next(), outputStream, writerParams);
            if (pageImagesItr.hasNext()) {
                log.error("Image encoder does not support multiple images. Only the first page"
                        + " has been produced.");
            }
        }
View Full Code Here

Examples of org.apache.xmlgraphics.image.writer.ImageWriter.writeImage()

     */
    public static void saveAsPNG(RenderedImage bitmap, File outputFile) throws IOException {
        OutputStream out = new FileOutputStream(outputFile);
        try {
            ImageWriter writer = ImageWriterRegistry.getInstance().getWriterFor("image/png");
            writer.writeImage(bitmap, out);
        } finally {
            IOUtils.closeQuietly(out);
        }
    }
   
View Full Code Here

Examples of org.apache.xmlgraphics.image.writer.MultiImageWriter.writeImage()

            MultiImageWriter multiWriter = writer.createMultiImageWriter(outputStream);
            try {
                // Write all pages/images
                while (pageImagesItr.hasNext()) {
                    RenderedImage img = (RenderedImage) pageImagesItr.next();
                    multiWriter.writeImage(img, writerParams);
                }
            } finally {
                multiWriter.close();
            }
        } else {
View Full Code Here

Examples of simtools.ui.HTMLWriter.writeImage()

          targets[i][4] = getShapeId(shape, i);

        }
      }
      // Write image with links
      writer.writeImage(_imageFile.getName(),resources.getString("imageFileTitle"), "IMAGEMAP", targets);
    }catch (IOException e){
      e.printStackTrace();
    }

    // Create sheet information
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.