Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

BMP & JPG  files to  PBM format

Posted on 2002-03-18
21
Medium Priority
?
1,019 Views
Last Modified: 2007-11-27
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



 
0
Comment
Question by:tunkuy
21 Comments
 
LVL 4

Expert Comment

by:pagladasu
ID: 6880402
0
 

Author Comment

by:tunkuy
ID: 6883090
ok! wait pls!
0
 

Author Comment

by:tunkuy
ID: 6883262
>>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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:tunkuy
ID: 6883442
Graphfile to PBM format??? any idea?
Thanks!!
0
 

Author Comment

by:tunkuy
ID: 6893132
Help!!!!!
0
 
LVL 1

Expert Comment

by:bearware
ID: 6896252
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
 

Author Comment

by:tunkuy
ID: 6896502
command line editor? I need make the functions to pass bmp2pbm.
Where I download the ppm tool kit??
(I Use win98 no unix)
0
 

Author Comment

by:tunkuy
ID: 6896564
the source code to bmp & jpg to pbm??
any idea?

or library to download
0
 

Author Comment

by:tunkuy
ID: 6908458
help! pls!
any idea?
0
 
LVL 1

Expert Comment

by:bearware
ID: 6912611
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
 

Author Comment

by:tunkuy
ID: 6914169
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
 

Author Comment

by:tunkuy
ID: 6916611
??
0
 

Author Comment

by:tunkuy
ID: 6918711
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
 

Author Comment

by:tunkuy
ID: 6918783
+100 increase points
0
 

Author Comment

by:tunkuy
ID: 6918817
**You cannot exceed 300 points for any single question.**
ohh
ok ok
0
 
LVL 1

Expert Comment

by:bearware
ID: 6920389
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
 

Author Comment

by:tunkuy
ID: 6921058
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
 
LVL 1

Accepted Solution

by:
bearware earned 1200 total points
ID: 6921104
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
 

Author Comment

by:tunkuy
ID: 6929540
wait pls!
I test your suggestion
0
 

Expert Comment

by:indira_shukla
ID: 6939813
Please refer book titled "Image Processing in C" by Dwyane Phillips. If you don't get it inform me.
Bye,
Best of luck..
0
 
LVL 46

Expert Comment

by:Kent Olsen
ID: 9477882
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question