• C

BMP & JPG files to PBM format

Hi Experts

I need convert (traslate)  BMP & JPG files to PBM format file, in C/C++ or visual C/C++.
Any idea?
Pls write a source code

thanks for all.

sorry my english , I promet studie the toefl test jeeje



 
tunkuyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
bearwareConnect With a Mentor Commented:
What I did:
Goto the cygwin link and down load that. (developers version)

install cygwin.

Download source of netpbm

Compile as shown above. (this used the gcc compiler)

Then link in librarys to you program.
0
 
pagladasuCommented:
0
 
tunkuyAuthor Commented:
ok! wait pls!
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
tunkuyAuthor Commented:
>>FreeImage is an Open Source library project for >>developers who would like to support popular graphics >>image formats like BMP, JPEG, TIFF and PCX and others as >>needed by today's multimedia applications. The libraries >>comes in two versions: a binary distribution that can be >>linked against any 32-bit c++ compiler and a source >>distribution. Workspace files for Microsoft Visual C++ 6 >>are provided, as well as makefiles for linux.
>> etc etc

Dear Pagladasu , thanks
But the program load and save equal formats I need,
JPG-> PBM    or
BMP-> PBM    or
or * graphfile -> PBM

any idea??


0
 
tunkuyAuthor Commented:
Graphfile to PBM format??? any idea?
Thanks!!
0
 
tunkuyAuthor Commented:
Help!!!!!
0
 
bearwareCommented:
you dont need to write it, just type this in to your shell,
Command line editor. You will need the ppm tool kit and a posix shell.

bmp2ppm Inputfile.Bmp | ppm2pbm > outputfile.pbm
0
 
tunkuyAuthor Commented:
command line editor? I need make the functions to pass bmp2pbm.
Where I download the ppm tool kit??
(I Use win98 no unix)
0
 
tunkuyAuthor Commented:
the source code to bmp & jpg to pbm??
any idea?

or library to download
0
 
tunkuyAuthor Commented:
help! pls!
any idea?
0
 
bearwareCommented:
Look here for the source (sorry I got the name wrong):
http://freshmeat.net/projects/netpbm/?topic_id=100

It should compile Ok in cygwin. http://www.cygwin.com

I Have cygwin, I then downloaded the toolkit
typed: ./configure
answered questions: notmerged, shared librarys
typed: make -i

The -i is because 2 .exe failed to make

typed: gcc -o pnmcolormap pnmcolormap.o libpam.o -lm `../buildtools/libopt cygpnm.dll ../ppm/cygppm.dll ../pgm/cygpgm.dll ../pbm/cygpbm.dll `
typed: gcc -o pnmremap pnmremap.o ../pnm/libpam.o `../buildtools/libopt cygpnm.dll ../ppm/cygppm.dll ../pgm/cygpgm.dll ../pbm/cygpbm.dll`

(cheep hack to fix above error. I sent a note to the maintaner.)

I could send you the .exe files if you want.
0
 
tunkuyAuthor Commented:
Dear Bearware

Thanks for you advance

But I work under windows no linux, and  I have problems
with the compiled.
I want C source code to understand the imagen to PBM (or PPM) and
emigrate to visual c/++

is posible the algorithm to do this?


I view the free software pic2pic (www.wavelsoftware.com)
no DLL, no Linux or files to emulated, Etc, only algorithm. (only one file, the exe)

any idea??  
 thanks!!
0
 
tunkuyAuthor Commented:
??
0
 
tunkuyAuthor Commented:
by sample
funtion  LoadJPG()
         SaveAsPBM()
source code
no exe file :(
any idea? to convert image from one format (BMP or JPG) to another format (PBM or PGM or PPM formats)?

Thanks for all
0
 
tunkuyAuthor Commented:
+100 increase points
0
 
tunkuyAuthor Commented:
**You cannot exceed 300 points for any single question.**
ohh
ok ok
0
 
bearwareCommented:
Sorry did I not make my self clear. I am using win NT not linux, and the tools I discribed come with libraries to use in 'C' programs.
0
 
tunkuyAuthor Commented:
Thanks bearware

       But I don´t understand how use the libraries to C & visual c/c++ programs.
       ** I have any message error ** when I compiled the files.
any idea? suggestion for use in win98 the libraries?
I donwnload the Win version but only have the exe files not the source code.

im desesperate.

Thanks for your advance

Thanks!  

(I listen of "the class framework GDI Made easy" of MS to convert image to one format to another format, but I don´t know if convert to PNM (pbm,pgm,ppm) formats.
do you Know? Im desesperate!! ahhhh
0
 
tunkuyAuthor Commented:
wait pls!
I test your suggestion
0
 
indira_shuklaCommented:
Please refer book titled "Image Processing in C" by Dwyane Phillips. If you don't get it inform me.
Bye,
Best of luck..
0
 
Kent OlsenData Warehouse Architect / DBACommented:
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:
Accept bearware's comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kent (Kdo)
EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.