Package com.keypoint

Examples of com.keypoint.PngEncoder


    {
        // quick caching ... use a weak list ...
        final WaitingImageObserver obs = new WaitingImageObserver(image);
        obs.waitImageLoaded();

        final PngEncoder encoder = new PngEncoder(image, PngEncoder.ENCODE_ALPHA, PngEncoder.FILTER_NONE, 5);
        final byte[] data = encoder.pngEncode();
        return produceFromByteArray(data);
    }
View Full Code Here


     * @return The byte[] that is the encoded image.
     * @throws IOException
     */
    public byte[] encode(BufferedImage bufferedImage) throws IOException {
        ParamChecks.nullNotPermitted(bufferedImage, "bufferedImage");
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha,
                0, this.quality);
        return encoder.pngEncode();
    }
View Full Code Here

     */
    public void encode(BufferedImage bufferedImage, OutputStream outputStream)
        throws IOException {
        ParamChecks.nullNotPermitted(bufferedImage, "bufferedImage");
        ParamChecks.nullNotPermitted(outputStream, "outputStream");
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha,
                0, this.quality);
        outputStream.write(encoder.pngEncode());
    }
View Full Code Here

     */
    public byte[] encode(BufferedImage bufferedImage) throws IOException {
        if (bufferedImage == null) {
            throw new IllegalArgumentException("Null 'image' argument.");
        }
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha,
                0, this.quality);
        return encoder.pngEncode();
    }
View Full Code Here

            throw new IllegalArgumentException("Null 'image' argument.");
        }
        if (outputStream == null) {
            throw new IllegalArgumentException("Null 'outputStream' argument.");
        }
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha,
                0, this.quality);
        outputStream.write(encoder.pngEncode());
    }
View Full Code Here

  {
    // quick caching ... use a weak list ...
    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();

    final PngEncoder encoder = new PngEncoder(image, PngEncoder.ENCODE_ALPHA, PngEncoder.FILTER_NONE, 5);
    final byte[] data = encoder.pngEncode();
    return produceFromByteArray(data);
  }
View Full Code Here

    // encode the image into a PNG
    // quick caching ... use a weak list ...
    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();

    final PngEncoder encoder = new PngEncoder(image,
        PngEncoder.ENCODE_ALPHA, PngEncoder.FILTER_NONE, 5);
    final byte[] data = encoder.pngEncode();

    // write the encoded picture ...
    final ContentItem dataFile = dataLocation.createItem
        (dataNameGenerator.generateName("picture", "image/png"));
View Full Code Here

    // encode the image into a PNG
    // quick caching ... use a weak list ...
    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();

    final PngEncoder encoder = new PngEncoder(image,
        PngEncoder.ENCODE_ALPHA, PngEncoder.FILTER_NONE, 5);
    final byte[] data = encoder.pngEncode();

    // write the encoded picture ...
    final ContentItem dataFile = dataLocation.createItem
        (dataNameGenerator.generateName("picture", "image/png"));
View Full Code Here

     * @return  The byte[] that is the encoded image.
     * @throws IOException
     */
    public byte[] encode(BufferedImage bufferedImage) throws IOException {
        if (bufferedImage == null) throw new IllegalArgumentException("Null 'image' argument.");
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha, 0, this.quality);
        return encoder.pngEncode();
    }
View Full Code Here

     * @throws IOException
     */
    public void encode(BufferedImage bufferedImage, OutputStream outputStream) throws IOException {
        if (bufferedImage == null) throw new IllegalArgumentException("Null 'image' argument.");
        if (outputStream == null) throw new IllegalArgumentException("Null 'outputStream' argument.");
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha, 0, this.quality);
        outputStream.write(encoder.pngEncode());
    }
View Full Code Here

TOP

Related Classes of com.keypoint.PngEncoder

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.