fis = new FileInputStream(imageFile);
} catch (FileNotFoundException e) {
e.printStackTrace();
return null;
}
ColorInputStream cis = new ColorInputStream(fis, colorDepth, true);
Color in;
try {
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
if ((in = cis.readNextColor()) == null) {
return ret;
}
try {
ret.setRGB(j, i, in.getRGB());
} catch (Exception e) {
}
}
}
} catch (IOException e) {
e.printStackTrace();
try {
cis.close();
} catch (IOException e1) {
}
}
return ret;
}