* @throws IOException If there is an error reading the jpeg data.
*/
public PDJpeg( PDDocument doc, InputStream is ) throws IOException
{
super( new PDStream( doc, is, true ), "jpg" );
COSDictionary dic = getCOSStream();
dic.setItem( COSName.FILTER, COSName.DCT_DECODE );
dic.setItem( COSName.SUBTYPE, COSName.IMAGE);
dic.setItem( COSName.TYPE, COSName.getPDFName( "XObject" ) );
BufferedImage image = getRGBImage();
setBitsPerComponent( 8 );
setColorSpace( PDDeviceRGB.INSTANCE );
setHeight( image.getHeight() );