Java Code Examples for com.lowagie.text.Image#setOriginalData()

The following examples show how to use com.lowagie.text.Image#setOriginalData() . 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: PngImage.java    From gcs with Mozilla Public License 2.0 5 votes vote down vote up
/** Reads a PNG from a byte array.
 * @param data the byte array
 * @throws IOException on error
 * @return the image
 */    
public static Image getImage(byte data[]) throws IOException {
    ByteArrayInputStream is = new ByteArrayInputStream(data);
    Image img = getImage(is);
    img.setOriginalData(data);
    return img;
}
 
Example 2
Source File: BmpImage.java    From itext2 with GNU Lesser General Public License v3.0 5 votes vote down vote up
/** Reads a BMP from a byte array.
 * @param data the byte array
 * @throws IOException on error
 * @return the image
 */    
public static Image getImage(byte data[]) throws IOException {
    ByteArrayInputStream is = new ByteArrayInputStream(data);
    Image img = getImage(is);
    img.setOriginalData(data);
    return img;
}
 
Example 3
Source File: PngImage.java    From itext2 with GNU Lesser General Public License v3.0 5 votes vote down vote up
/** Reads a PNG from a byte array.
 * @param data the byte array
 * @throws IOException on error
 * @return the image
 */    
public static Image getImage(byte data[]) throws IOException {
    ByteArrayInputStream is = new ByteArrayInputStream(data);
    Image img = getImage(is);
    img.setOriginalData(data);
    return img;
}
 
Example 4
Source File: BmpImage.java    From gcs with Mozilla Public License 2.0 3 votes vote down vote up
/**
 * Reads a BMP from a byte array.
 * 
 * @param data the byte array
 * @throws IOException on error
 * @return the image
 */
public static Image getImage(byte data[]) throws IOException {
	ByteArrayInputStream is = new ByteArrayInputStream(data);
	Image img = getImage(is);
	img.setOriginalData(data);
	return img;
}