diff -Npru old/cfitsio/cfileio.c new/cfitsio/cfileio.c
old
|
new
|
int fits_copy_image_section( |
2647 | 2647 | char *cptr, keyname[FLEN_KEYWORD], card[FLEN_CARD]; |
2648 | 2648 | int ii, tstatus, anynull; |
2649 | 2649 | long minrow, maxrow, minslice, maxslice, mincube, maxcube; |
2650 | | long iii, jjj, kkk, firstpix; |
| 2650 | long firstpix; |
| 2651 | long ncubeiter, nsliceiter, nrowiter, kiter, jiter, iiter; |
2651 | 2652 | int klen, kk, jj; |
2652 | 2653 | long outnaxes[9], outsize, buffsize; |
2653 | 2654 | double *buffer, crpix, cdelt; |
… |
… |
int fits_copy_image_section( |
2843 | 2844 | |
2844 | 2845 | minrow = fpixels[1]; |
2845 | 2846 | maxrow = lpixels[1]; |
| 2847 | if (minrow > maxrow) { |
| 2848 | nrowiter = (minrow - maxrow + incs[1]) / incs[1]; |
| 2849 | } else { |
| 2850 | nrowiter = (maxrow - minrow + incs[1]) / incs[1]; |
| 2851 | } |
| 2852 | |
2846 | 2853 | minslice = fpixels[2]; |
2847 | 2854 | maxslice = lpixels[2]; |
| 2855 | if (minslice > maxslice) { |
| 2856 | nsliceiter = (minslice - maxslice + incs[2]) / incs[2]; |
| 2857 | } else { |
| 2858 | nsliceiter = (maxslice - minslice + incs[2]) / incs[2]; |
| 2859 | } |
| 2860 | |
2848 | 2861 | mincube = fpixels[3]; |
2849 | 2862 | maxcube = lpixels[3]; |
2850 | | |
| 2863 | if (mincube > maxcube) { |
| 2864 | ncubeiter = (mincube - maxcube + incs[3]) / incs[3]; |
| 2865 | } else { |
| 2866 | ncubeiter = (maxcube - mincube + incs[3]) / incs[3]; |
| 2867 | } |
| 2868 | |
2851 | 2869 | firstpix = 1; |
2852 | | for (kkk = mincube; kkk <= maxcube; kkk += incs[3]) |
| 2870 | for (kiter = 0; kiter < ncubeiter; kiter++) |
2853 | 2871 | { |
2854 | | fpixels[3] = kkk; |
2855 | | lpixels[3] = kkk; |
2856 | | for (jjj = minslice; jjj <= maxslice; jjj += incs[2]) |
| 2872 | if (mincube > maxcube) { |
| 2873 | fpixels[3] = mincube - (kiter * incs[3]); |
| 2874 | } else { |
| 2875 | fpixels[3] = mincube + (kiter * incs[3]); |
| 2876 | } |
| 2877 | |
| 2878 | lpixels[3] = fpixels[3]; |
| 2879 | |
| 2880 | for (jiter = 0; jiter < nsliceiter; jiter++) |
2857 | 2881 | { |
2858 | | fpixels[2] = jjj; |
2859 | | lpixels[2] = jjj; |
2860 | | for (iii = minrow; iii <= maxrow; iii += incs[1]) |
| 2882 | if (minslice > maxslice) { |
| 2883 | fpixels[2] = minslice - (jiter * incs[2]); |
| 2884 | } else { |
| 2885 | fpixels[2] = minslice + (jiter * incs[2]); |
| 2886 | } |
| 2887 | |
| 2888 | lpixels[2] = fpixels[2]; |
| 2889 | |
| 2890 | for (iiter = 0; iiter < nrowiter; iiter++) |
2861 | 2891 | { |
2862 | | fpixels[1] = iii; |
2863 | | lpixels[1] = iii; |
| 2892 | if (minrow > maxrow) { |
| 2893 | fpixels[1] = minrow - (iiter * incs[1]); |
| 2894 | } else { |
| 2895 | fpixels[1] = minrow + (iiter * incs[1]); |
| 2896 | } |
| 2897 | |
| 2898 | lpixels[1] = fpixels[1]; |
2864 | 2899 | |
2865 | 2900 | if (bitpix == 8) |
2866 | 2901 | { |
diff -Npru old/cfitsio/changes.txt new/cfitsio/changes.txt
old
|
new
|
|
2 | 2 | |
3 | 3 | Version 3.25 - 9 June 2010 |
4 | 4 | |
| 5 | - fixed bug that was introduced in version 3.13 that broke the ability |
| 6 | to reverse an image section along the y-axis with an image section |
| 7 | specifier like this: myimage.fits[*,-*]. This bug caused the output |
| 8 | image to be filled with zeros. |
| 9 | |
5 | 10 | - fixed typo in the definition of the ftgprh Fortran wrapper routine |
6 | 11 | in f77_wrap3.c. |
7 | 12 | |
8 | 13 | - modified the cfitsio.pc.in configuration file to make the lib path |
9 | | a variable, instead of hard coding the path. The provides more |
| 14 | a variable instead of hard coding the path. The provides more |
10 | 15 | flexibility for projects such as suse and fedora when building CFITSIO. |
11 | 16 | |
12 | 17 | - fixed bug in imcomp_compress_tile in imcompress.c which caused |