astrogo / fitsio

fitsio is a pure-Go package to read and write `FITS` files
BSD 3-Clause "New" or "Revised" License
54 stars 22 forks source link

image: make imageHDU.Image concurrent friendly #10

Closed sbinet closed 8 years ago

sbinet commented 8 years ago

decoding of imageHDU.Image() image.Image for BITPIX -32 and -64 relies on some global variables (the fmin32 et al. variables)

fix this by adding Min and Max fields to f32Image and f64Image which would be calculated when they are created, modifying the newF32Image constructor to take the raw buffer and iterate over it to get the min and max values.