/**
  * @param inputPath Absolute filename pathname or "-" to use a stream
  * @param inputStream Can be null
  * @param sourceFormat
  * @return
  * @throws ProcessorException
  */
 private Dimension doGetSize(String inputPath, InputStream inputStream, SourceFormat sourceFormat)
     throws ProcessorException {
   if (getAvailableOutputFormats(sourceFormat).size() < 1) {
     throw new UnsupportedSourceFormatException(sourceFormat);
   }
   try {
     Info sourceInfo;
     if (inputStream != null) {
       sourceInfo = new Info(inputPath, inputStream, true);
     } else {
       sourceInfo = new Info(inputPath, true);
     }
     Dimension dimension = new Dimension(sourceInfo.getImageWidth(), sourceInfo.getImageHeight());
     return dimension;
   } catch (IM4JavaException e) {
     throw new ProcessorException(e.getMessage(), e);
   }
 }