Java Code Examples for org.jfree.chart.encoders.EncoderUtil#encode()

The following examples show how to use org.jfree.chart.encoders.EncoderUtil#encode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChartUtilities.java    From opensim-gui with Apache License 2.0 3 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 * @param encodeAlpha  encode alpha?
 * @param compression  the PNG compression level (0-9).
 *
 * @return The byte array in PNG format.
 * 
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha, 
                                 int compression) 
        throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG, compression, 
            encodeAlpha);
}
 
Example 2
Source File: ChartUtilities.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 * @param encodeAlpha  encode alpha?
 * @param compression  the PNG compression level (0-9).
 *
 * @return The byte array in PNG format.
 * 
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha, 
                                 int compression) 
        throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG, compression, 
            encodeAlpha);
}
 
Example 3
Source File: ChartUtilities.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 * @param encodeAlpha  encode alpha?
 * @param compression  the PNG compression level (0-9).
 *
 * @return The byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha,
                                 int compression)
        throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG, compression,
            encodeAlpha);
}
 
Example 4
Source File: ChartUtilities.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 * @param encodeAlpha  encode alpha?
 * @param compression  the PNG compression level (0-9).
 *
 * @return The byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha,
        int compression) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG, compression,
            encodeAlpha);
}
 
Example 5
Source File: ChartUtilities.java    From openstock with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 *
 * @return A byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG);
}
 
Example 6
Source File: ChartUtilities.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 *
 * @return A byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG);
}
 
Example 7
Source File: ChartUtilities.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 * @param encodeAlpha  encode alpha?
 * @param compression  the PNG compression level (0-9).
 *
 * @return The byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha,
        int compression) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG, compression,
            encodeAlpha);
}
 
Example 8
Source File: ChartUtilities.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 *
 * @return A byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG);
}
 
Example 9
Source File: ChartUtilities.java    From opensim-gui with Apache License 2.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 *
 * @return A byte array in PNG format.
 * 
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG);
}
 
Example 10
Source File: ChartUtilities.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 *
 * @return A byte array in PNG format.
 * 
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG);
}
 
Example 11
Source File: ChartUtilities.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 *
 * @return A byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG);
}
 
Example 12
Source File: ChartUtilities.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 * @param encodeAlpha  encode alpha?
 * @param compression  the PNG compression level (0-9).
 *
 * @return The byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha,
        int compression) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG, compression,
            encodeAlpha);
}
 
Example 13
Source File: ChartUtilities.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 *
 * @return A byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG);
}
 
Example 14
Source File: ChartUtilities.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 * @param encodeAlpha  encode alpha?
 * @param compression  the PNG compression level (0-9).
 *
 * @return The byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha,
        int compression) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG, compression,
            encodeAlpha);
}
 
Example 15
Source File: ChartUtilities.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 *
 * @return A byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG);
}
 
Example 16
Source File: ChartUtilities.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 * @param encodeAlpha  encode alpha?
 * @param compression  the PNG compression level (0-9).
 *
 * @return The byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha,
        int compression) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG, compression,
            encodeAlpha);
}
 
Example 17
Source File: ChartUtilities.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 *
 * @return A byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG);
}
 
Example 18
Source File: ChartUtilities.java    From openstock with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Encodes a {@link BufferedImage} to PNG format.
 *
 * @param image  the image (<code>null</code> not permitted).
 * @param encodeAlpha  encode alpha?
 * @param compression  the PNG compression level (0-9).
 *
 * @return The byte array in PNG format.
 *
 * @throws IOException if there is an I/O problem.
 */
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha,
        int compression) throws IOException {
    return EncoderUtil.encode(image, ImageFormat.PNG, compression,
            encodeAlpha);
}