Hi, I am writing a java program that will read an image in, convert it to greyscale, and then shoot it back out into a new file. The only problem is, I can't figure out how to make my program skip over header comments in the original image, any ideas? Thanks for any help!
Header comments
Collapse
X
-
Tags: None
-
What headers are you talking about? Can you explain how you are reading in the image?Originally posted by fluffybunny87Hi, I am writing a java program that will read an image in, convert it to greyscale, and then shoot it back out into a new file. The only problem is, I can't figure out how to make my program skip over header comments in the original image, any ideas? Thanks for any help! -
I have to write a program in Java to read a PPM file from standard in and output put it in grayscale using PGM format to standard out. To test the program, I redirect a PPM file to standard in, and redirect to output to a file e.g. java RGBtoGray < in.ppm > out.pgm.
In the code of a picture, there are sometimes comments or other things that don't need to be read to output the image, I need to know how to skip over the unwanted characters and still just print out the image.
Originally posted by r035198xWhat headers are you talking about? Can you explain how you are reading in the image?Comment
Comment