diff options
Diffstat (limited to 'converter/other/fitstopnm.c')
-rw-r--r-- | converter/other/fitstopnm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/converter/other/fitstopnm.c b/converter/other/fitstopnm.c index 86bdfbb8..9df47be3 100644 --- a/converter/other/fitstopnm.c +++ b/converter/other/fitstopnm.c @@ -30,6 +30,12 @@ ** disabled min max scanning when reading from stdin. */ +/* + The official specification of FITS format (which is for more than + just visual images) is at + ftp://legacy.gsfc.nasa.gov/fits_info/fits_office/fits_standard.pdf +*/ + #include <string.h> #include <float.h> @@ -507,6 +513,13 @@ convertPgmRaster(FILE * const ifP, double const datamin, xel ** const xels) { + /* Note: the FITS specification does not give the association between + file position and image position (i.e. is the first pixel in the + file the top left, bottom left, etc.). We use the common sense, + popular order of row major, top to bottom, left to right. This + has been the case and accepted since 1989, but in 2008, we discovered + that Gimp and ImageMagick do bottom to top. + */ unsigned int image; pm_message("writing PGM file"); |