COSStream xstream = (COSStream) xobject;
String subtype = xstream.getNameAsString(COSName.SUBTYPE);
// according to the PDF Reference : a thumbnail subtype must be Image if it is not null
if (PDXObjectImage.SUB_TYPE.equals(subtype) || (subtype == null && isThumb))
{
PDStream image = new PDStream(xstream);
// See if filters are DCT or JPX otherwise treat as Bitmap-like
// There might be a problem with several filters, but that's ToDo until
// I find an example
List<COSName> filters = image.getFilters();
if (filters != null && filters.contains(COSName.DCT_DECODE))
{
return new PDJpeg(image);
}
else if (filters != null && filters.contains(COSName.CCITTFAX_DECODE))