473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Header comments

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!
Nov 7 '06 #1
2 2373
r035198x
13,262 8TB
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!
What headers are you talking about? Can you explain how you are reading in the image?
Nov 8 '06 #2
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.

What headers are you talking about? Can you explain how you are reading in the image?
Nov 8 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Francisco Mendez | last post by:
I get the following message when trying to run my script: "Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/newcustomer.php:23) in...
7
by: beliavsky | last post by:
Ideally, one can use someone's C++ code by just looking at the header files (which should contain comments describing the functions in addition to function definitions), without access to the full...
2
by: A | last post by:
Hi, Can you actually compile header files? I'm writing a header file named "test.h" using Visual C++ 6.0 and I get the following error message when I try to compile it: "no compile tool...
0
by: Ryan Stewart | last post by:
In some situations, I'd like to put some content within a box with a header. No real problem there. But what if I want the header to have something on the left hand side as well as on the right,...
11
by: Steven T. Hatton | last post by:
In the past there have been lengthy discussiions regarding the role of header files in C++. People have been very adamat about header files serving as in interface to the implementation. I do...
18
by: Exits Funnel | last post by:
Hello, I'm a little confused about where I should include header files and was wondering whether there was some convention. Imagine I've written a class foo and put the definition in foo.h and...
11
by: Haro Panosyan | last post by:
My appologies, this is not directly C/C++ related. I have a C++ library, which is going to be shipped as compiled library, but the header files are going to be as source code, so people can...
18
by: John Smith | last post by:
Hi all What does the group think of the practise of including one header file from inside another? I have some legacy code where this has been done, and it creates a dependency on a module...
8
by: Chandrashekar Tippur | last post by:
All, We want to associate a argument with a corresponding entry in header file. How do we do this? The argument is defined in a header file. We want to extract the value of the #define...
4
by: tirath | last post by:
hi, I want to display data in on my web page, in gridview in this format: Group A Group B A1 A2 B1 B2 Test 1 1 2 1 2 Test 2 1 2 1 2 Group A is header to columns A1 and A2...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.