Solved

BMP & JPG  files to  PBM format

Posted on 2002-03-18
21
1,005 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: 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!

 

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 300 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 45

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

Independent Software Vendors: 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

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

624 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