public final SourceProperty getSourceProperty(Source source, String namespace, String name)
throws SourceException {
if (handlesProperty(namespace,name) && isImageMimeType(source) && isImageFileType(source)) {
if (name.equals(IMAGE_WIDTH_PROPERTY_NAME))
return new SourceProperty(PROPERTY_NS, IMAGE_WIDTH_PROPERTY_NAME,
String.valueOf(getImageSize(source)[0]));
if (name.equals(IMAGE_HEIGHT_PROPERTY_NAME))
return new SourceProperty(PROPERTY_NS, IMAGE_HEIGHT_PROPERTY_NAME,
String.valueOf(getImageSize(source)[1]));
}
return null;
}