ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Question concerning a program for converting RAW pictures to PGM file formats...

(1/1)

Renox:
Ok, so... I am writing a nice little utility to convert a RAW picture file to a PGM file. Everything works great. Coding came out nice and it does exactly what I need it to do. However, I was wondering if there is anyway to convert a PGM file to JPEG format using C.

Renox:
bump

gjehle:
i sure hope you used dcraw for raw conversion, otherwise you might have re-invented the wheel

the basic idea for image conversion usually is:
- load format x (this should give you a bitmap)
- convert said bitmap to destination format y

i recommended using libjpeg (http://freshmeat.net/projects/libjpeg/)
just spare yourself the effort of reinventing the wheel :P

esp. for image processing algorithms the already existing solution is magnitudes
better/faster than what you would come up with.
unless you're a image processing god, or the problem is very special ;-)

Renox:
Thank you very much for the reply. I was wondering if anyone knew how to do this. I did, unfortunately re-invent the wheel so to speak.... I wanted to understand the data flow of the arrays for the actual image and the template it holds. I am still playing with things...

gjehle:
well, it is a good thing to know how stuff works
sadly, most of the time one doesn't have the time (or virtue) to dig into the details.
esp. if you're coding stuff at work where money and time matters ;-)

Navigation

[0] Message Index

Go to full version