Hi Franklin,
If you're not into Starlink software at least in a small way,
then there are probably other ways to do your conversion.
A key thing to look at is the netpbm package and its PNM
image file formats. Among the netpbm utilities are conversions
from any format and to any format, so you could e.g.
jpegtopnm <file.jpg | pnmtofits >file.png
without even writing the rather large PNM file.
The PNM formats are quite trivial. To read them with your
software you should write it in C or C++ and use the libpbm
library (or write in Java and use its classes to read
whichever format you have). But in a quick and dirty approach
you can look up what the PNM formats are and read the pixel
values from file with quite simple Fortran I/O statements.
libpbm should be in your favourite Linux distro.
For info about the PNM formats try
man 5 ppm
man 5 pgm
man 5 pbm
Cheers,
Horst
On Tue, Jan 29, 2008 at 09:29:41PM +0000, Franklin Shaffer wrote:
> I simply would like to read images in bmp, jpg, OR tif into Fortran
> programs.
>
> Is there a simpler way to do this than IMG?
>
> I downloaded the Intel install file from
> http://starlink.jach.hawaii.edu/download/
> which took two hours, but I couldn't extract the file because it was
> corrupted.
>
> Thanks for any advice!
> Frank Shaffer
> USDOE National Energy Technology Laboratory
>
> ps: I am studying the physics of particle motion in energy conversion
> processes, primarily Integrated Combined Cycle Gasification.
> I have thousands of high speed video images of particle motion. I writing
> Fortran code to process and analyze the images.
> Yes, I'm a relic who still uses Fortran...
--
Horst Meyerdierks Royal Observatory Edinburgh
Un*x/Network Manager [log in to unmask]
http://www.roe.ac.uk/~hme/ +44-131-6688-309
|