// <b>get the image's width and height. </b>
Dimension d = Sanselan.getImageSize(imageBytes);
// <b>get all of the image's info (ie. bits per pixel, size, transparency, etc.) </b>
ImageInfo imageInfo = Sanselan.getImageInfo(imageBytes);
if (imageInfo.getColorType() == ImageInfo.COLOR_TYPE_GRAYSCALE)
System.out.println("Grayscale image.");
if (imageInfo.getHeight() > 1000)
System.out.println("Large image.");
// <b>try to guess the image's format. </b>
ImageFormat image_format = Sanselan.guessFormat(imageBytes);
image_format.equals(ImageFormat.IMAGE_FORMAT_PNG);