Link to home
Start Free TrialLog in
Avatar of tunkuy
tunkuy

asked on

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



 
Avatar of pagladasu
pagladasu

Avatar of tunkuy

ASKER

ok! wait pls!
Avatar of tunkuy

ASKER

>>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??


Avatar of tunkuy

ASKER

Graphfile to PBM format??? any idea?
Thanks!!
Avatar of tunkuy

ASKER

Help!!!!!
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
Avatar of tunkuy

ASKER

command line editor? I need make the functions to pass bmp2pbm.
Where I download the ppm tool kit??
(I Use win98 no unix)
Avatar of tunkuy

ASKER

the source code to bmp & jpg to pbm??
any idea?

or library to download
Avatar of tunkuy

ASKER

help! pls!
any idea?
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.
Avatar of tunkuy

ASKER

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!!
Avatar of tunkuy

ASKER

??
Avatar of tunkuy

ASKER

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
Avatar of tunkuy

ASKER

+100 increase points
Avatar of tunkuy

ASKER

**You cannot exceed 300 points for any single question.**
ohh
ok ok
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.
Avatar of tunkuy

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of bearware
bearware
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tunkuy

ASKER

wait pls!
I test your suggestion
Please refer book titled "Image Processing in C" by Dwyane Phillips. If you don't get it inform me.
Bye,
Best of luck..
Avatar of Kent Olsen
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