{
ximage = new PDJpeg(document, new FileInputStream(imageFilename));
}
else if (imageFilename.toLowerCase().endsWith(".tif") || imageFilename.toLowerCase().endsWith(".tiff"))
{
ximage = new PDCcitt(document, new RandomAccessFile(new File(imageFilename), "r"));
}
else
{
BufferedImage awtImage = ImageIO.read(new File(imageFilename));
ximage = new PDPixelMap(document, awtImage);