Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i need to convert the images to be stored in a folder from jpeg to pgm using .net code... please help
Posted
Comments
[no name] 9-May-13 13:54pm    
"please help"... with what? This is not a question or a description of any kind of a problem.
Member 9891760 9-May-13 14:12pm    
i need help with the coding...i dont know how to do this conversion
[no name] 9-May-13 14:18pm    
And...? What have you tried? What research have you done? What language are you writing your code in? What version of .NET are you using? Where is the code that demonstrates your problem? What is the problem that you have with the code that you have written?

1 solution

There is nothing in the standard Image class to handle PNG files; and I know of nothing that can handle the conversion - since JPG are full colour and PGM are greyscale, that doesn't surprise me. And given that is is an uncompressed, very basic file format, I am not surprised by the general lack of support.

So probably, you will have to write your own.
These two links should help: PGM File specification[^]
Reading-Writing PGM(Portable Graphics Media) Image Files With C#(C Sharp)[^]
But do not expect the C# code to be a complete solution: it very definitely isn't! You are very much on your own with this one...
 
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