fix mono fits write

we should write mono images as naxis=2

see https://github.com/libvips/libvips/issues/3265
This commit is contained in:
John Cupitt 2023-01-06 12:06:12 +00:00
parent 8ea519eab7
commit a52b8e3681
2 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,7 @@ xx/1/23 8.14.1
- add vips_semaphore_down_timeout() [kleisauke]
- idle threads are removed after 15s [kleisauke]
- fix version number in gtk-doc index [kleisauke]
- save mono fits images as NAXIS=2 [ewelot]
22/12/22 8.14.0

View File

@ -36,6 +36,8 @@
* 27/10/22
* - band interleave ourselves on read
* - don't duplicate metadata
* 6/1/23 ewelot
* - save mono images as NAXIS=2
*/
/*
@ -658,7 +660,7 @@ vips_fits_set_header( VipsFits *fits, VipsImage *in )
status = 0;
fits->naxis = 3;
fits->naxis = in->Bands == 1 ? 2 : 3;
fits->naxes[0] = in->Xsize;
fits->naxes[1] = in->Ysize;
fits->naxes[2] = in->Bands;