Re: BufferedImage & pixels.
From: aaaaaaaaaaaa (aaaaaaaaaaaa_at_wp.pl_invalid)
Date: 01/17/04
- Next message: Manolis Christodoulou: "Re: Mars Rover Controlled By Java"
- Previous message: Jacqueline: "Apache Axis Client receive list of String Arrays"
- In reply to: Chris Smith: "Re: BufferedImage & pixels."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 17 Jan 2004 18:13:15 +0100
w <news:MPG.1a72fa12589aec0b9898b1@news.pop4.net>
Chris Smith wrote:
> My guess is that your "Y" array contains an image with bad
> contrast.
Try again :)
Below code makes ".raw" file, which looks great...
byte[] r = new byte[imageWidth * imageHeight];
int k = 0;
for (int i = 0; i < imageHeight; i++)
for (int j = 0; j < imageWidth; j++) {
r[k] = (byte) Y[j][i];
k++;
}
try {
out.write(r);
} catch (IOException e) {
e.printStackTrace();
}
Any other ideas, how to create b&w BufferedImage?
- Next message: Manolis Christodoulou: "Re: Mars Rover Controlled By Java"
- Previous message: Jacqueline: "Apache Axis Client receive list of String Arrays"
- In reply to: Chris Smith: "Re: BufferedImage & pixels."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|