- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve:
I started looking at the second program by Professor Bird, called GSRM.
The program compiled first time on the 2015 beta in debug mode.
Easy well written code to follow and amend. I now have an array on double precision numbers, 1801 by 3601 exactly.
It is straightforward in C# to draw the output data on a jpg file, I do this a lot. In Fortran I used to draw as DXF Files, but C# is so easy being able to poke the values into the points on the JPG file.
1. Can I write to a JPG type format in Fortran? I will convert the reals to integer steps as required.
2. If not, what is the "easiest" way to transfer the array from Fortran to C#. I have several working programs that do sort of this stuff, but it is horribly convoluted, is there an easy way. the alternative is to write to a file and then read it, but that is not nice. Having the pictures makes it a lot easier to understand the output compared to an array of 1800 by 3600 reals.
JMN
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Suggestion: it is much easier to create/save a .BMP image than a .JPG, and this is easily done directly from IVF. BMPs are direct {r,g,b} pixellations which do not alter the image content, whereas JPGs involve lots of algorithm (complex coding) and are lossy, so the resulting image is only an approximation of the original data when the actual pixel values are important (example: long time ago I did ratio fluorescence imagery, where each pixel in the ratio image represented a chemical concentration, and any algorithmic tomfoolery would change the science). You can also map your data values onto a "perceptually correct rainbow" of colors for maximum visual impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All:
I spent some time looking for some code that already existed. I found some code at a University website, which is short sharp and to the point.
The problem is of course having to get your hands dirty - so to speak in dealing with the code.
It ran first time on 2015 beta, gave me nice bit map images, which is ok, one can always save.
I will write a simple subroutine to pass in the array and then set the colours.
Thanks
JMN
! -------------------------------------------- ! Sample FORTRAN 77 program to make PPM / BMP ! ! 1998-Apr-03 (long long ago) ! : ! 2005-Jul-22 (added P3) ! : ! 2006 Dec-22 (added BMP) ! ! Image array rgb(3,!,!) is filled in subroutine mkbitmap() ! and ! saved in PPM or BMP format in subroutine pixout(). ! ! K. Hayashi ! -------------------------------------------- !

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page