Added benchmarking code and updated TODO I thought of a way to improve the performance on flat images where the maximum bin is towards the end of the histogram. Bi-search. Images where the minimum is towards the end of the minum take less than a second to load. Flat images take one second more (100%) worst.
Added color support and negative I copied the ds9 SLS color table and it looks very similar without interpolation. I can perhaps convert the color table to integers to save space since it is not critical to have it identical. I get segmentation faults in tonatiuh but not in tlaloc.
histogram based min max values. environment vals The y axis was inverted becase the way the fits files are saved. This has been fixed. I now use DATAMIN DATAMAX environmental variables to pass values to the loader. At the moment this only works if both are defined but it might be useful to split this. If these variables don't exist the we do histogram and base the min and max on this, very similar to ds9's 99.5 scaling.
A fits loader for the imlib2 library. The hardest part was compiling it. I'm using gbilo make file but the commands on doit.sh also work. This last was what I was able to figure out from the makefile of the GIF loader. In this first commit, I'm able to see somekind of image but the rescaling hasn't been done yet. The fits writer needs to written also (.argb). This loader was started by editing the loader_argb.c. TODO: make it more robust, better handling of data types, check if there are datamin datamax values in the header.