if ((namespace.equals(PROPERTY_NS)) &&
((name.equals(IMAGE_WIDTH_PROPERTY_NAME)) || (name.equals(IMAGE_HEIGHT_PROPERTY_NAME))) &&
(source.getURI().endsWith(".jpg")) && (isJPEGFile(source))) {
if (name.equals(IMAGE_WIDTH_PROPERTY_NAME))
return new SourceProperty(PROPERTY_NS, IMAGE_WIDTH_PROPERTY_NAME,
String.valueOf(getJpegSize(source)[0]));
if (name.equals(IMAGE_HEIGHT_PROPERTY_NAME))
return new SourceProperty(PROPERTY_NS, IMAGE_HEIGHT_PROPERTY_NAME,
String.valueOf(getJpegSize(source)[1]));
}
return null;
}