Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a grey scale image. Now I need to retrieve the pixel value and write in a text file using C code. I need those value for compressing the image. Previously I used MATLAB for that purpose. But presently I need C code for the same.
Posted
Updated 13-May-10 0:44am
v3

While it is possible using Turbo C for such a purpose, why don't you use a more recent compiler? Visual C++ Express Edition is available for free, for instance.

As about the programming question: once you know the format of the image file, it shouldn't be a daunting task writing a function to extract the required info.
:)
 
Share this answer
 
On Windows NT v4.0 I have a text-files.
If I try to use in a batch the next code:

set zname=Tb.txt
FOR /F "delims=" %%i in (%zname%) do (
echo %%i
)

Then I can see on the screen the content of the file.
But if the name of the file has spaces, like :

set zname=T b.txt
FOR /F "delims=" %%i in ("%zname%") do (
echo %%i
)

then the echo will print on the screen only the name of the file, like:

T b.txt

instead of the content of the file. By taking away the ""
example: FOR /F "delims=" %%i in (%zname%) do (
I getting back the error:
Cannot find the file T.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900