1 3 package org.faceless.pdf; 4 5 import java.util.*; 6 import java.io.*; 7 import java.awt.*; 8 9 48 public class PDFImage extends PeeredObject 49 { 50 final org.faceless.pdf2.PDFImage image; 51 52 Object getPeer() 53 { 54 return image; 55 } 56 57 PDFImage(org.faceless.pdf2.PDFImage image) 58 { 59 this.image=image; 60 } 61 62 75 public PDFImage(Image img) 76 throws InterruptedException , IllegalArgumentException 77 { 78 image = new org.faceless.pdf2.PDFImage(img); 79 } 80 81 99 public PDFImage(InputStream in) 100 throws IOException, IllegalArgumentException 101 { 102 image = new org.faceless.pdf2.PDFImage(in); 103 } 104 105 111 public PDFImage(byte[] in) 112 throws IOException, IllegalArgumentException 113 { 114 image = new org.faceless.pdf2.PDFImage(in); 115 } 116 117 126 public int getWidth() 127 { 128 return (int)image.getWidth(); 129 } 130 131 140 public int getHeight() 141 { 142 return (int)image.getHeight(); 143 } 144 145 149 public double getDPIX() 150 { 151 return image.getDPIX(); 152 } 153 154 158 public double getDPIY() 159 { 160 return image.getDPIY(); 161 } 162 163 176 public void setColorSpace(java.awt.color.ColorSpace space) 177 { 178 } 180 181 188 public void setMetaData(String xmldata) 189 { 190 image.setMetaData(xmldata); 191 } 192 193 201 public Reader getMetaData() 202 throws IOException 203 { 204 return image.getMetaData(); 205 } 206 } 207 | Popular Tags |