Class ImageTools
java.lang.Object
|
+--ImageTools
- public class ImageTools
- extends java.lang.Object
This class implements methods to apply to images.
Method Summary |
int[] |
examineInput(javax.swing.ImageIcon inputIcon)
Converts an imageIcon into a 1D array. |
int |
getHeight(javax.swing.ImageIcon icon)
Returns the height of the image. |
int |
getWidth(javax.swing.ImageIcon icon)
Returns the width of the image |
javax.swing.ImageIcon |
scaleImage(javax.swing.ImageIcon icon)
Scales an image into 256*256. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ImageTools
public ImageTools()
scaleImage
public javax.swing.ImageIcon scaleImage(javax.swing.ImageIcon icon)
- Scales an image into 256*256.
- Parameters:
icon
- the ImageIcon representing the image.- Returns:
- the ImageIcon representing the scaled image.
getWidth
public int getWidth(javax.swing.ImageIcon icon)
- Returns the width of the image
getHeight
public int getHeight(javax.swing.ImageIcon icon)
- Returns the height of the image.
examineInput
public int[] examineInput(javax.swing.ImageIcon inputIcon)
- Converts an imageIcon into a 1D array.
- Parameters:
the
- imageIcon representing the image- Returns:
- the 1D int array representing the image.