protected boolean scanImage(byte[] imageData) {
    	 ImageInfo ii = new ImageInfo();
    	 ii.setInput(new ByteArrayInputStream(imageData));
    	 if (ii.check()) {
    		 // grokked
    		 this.imgHeight=ii.getHeight();
    		 this.imgWidth=ii.getWidth();
    		 this.imgBitsPerPixel=ii.getBitsPerPixel();
    		 if(this.imgBitsPerPixel<0)
    			 this.imgBitsPerPixel=0;
    		 
    		 if(this.imgBitsPerPixel <= 8) {
    			 // 8bpp or less guessing indexed + entire color space
    			 this.imgIndexedColors = 1;
    			 for(int i=0;i<this.imgBitsPerPixel;i++) {
    				 this.imgIndexedColors *= 2;
    			 }
    		 } else {
    			 // more than 8bpp guessing not indexed
    			 this.imgIndexedColors = 0;
    		 }
    		 
    		 // ii.getMimeType()
    		 return true;
    	 }
    	 /* System.out.println(ii.getFormatName() + ", " + ii.getMimeType() + 
    	 *   ", " + ii.getWidth() + " x " + ii.getHeight() + " pixels, " + 
    	 *   ii.getBitsPerPixel() + " bits per pixel, " + ii.getNumberOfImages() +
    	 *   " image(s), " + ii.getNumberOfComments() + " comment(s).");
    	 *  // there are other properties, check out the API documentation        
    	 */
    	 
    	//todo: log (need to pass in log owner..)
        this.resetImageGeometry();
        return false;
    }