mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
plug-ins: Match RGB FITS orientation to SiriL
Switching to the cfitsio library's fits_read_img () function in 03ea666f
caused RGB FITS images to be read in upside down per SiriL developers and
NASA standards (odd, since cfitsio is maintained by NASA). This flips them back.
This commit is contained in:
parent
71fa32424c
commit
3cf5a587ce
1 changed files with 11 additions and 0 deletions
|
@ -605,6 +605,17 @@ load_image (GFile *file,
|
|||
show_fits_errors (status);
|
||||
|
||||
g_object_unref (buffer);
|
||||
|
||||
if (hdu.naxisn[2] && hdu.naxisn[2] == 3)
|
||||
{
|
||||
/* Per SiriL developers, FITS images should be loaded from the
|
||||
* bottom up. fits_read_img () loads them from top down, so we
|
||||
* should flip the layer. */
|
||||
gimp_item_transform_flip_simple (GIMP_ITEM (layer),
|
||||
GIMP_ORIENTATION_VERTICAL,
|
||||
TRUE, -1.0);
|
||||
}
|
||||
|
||||
if (pixels)
|
||||
g_free (pixels);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue