Skip to content

Commit a69c773

Browse files
committed
core: Handle ASE palettes with header padding
This removes any padding the color space label might have originally, which interfered with g_str_has_prefix ().
1 parent 7372521 commit a69c773

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/core/gimppalette-load.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -762,22 +762,22 @@ gimp_palette_load_ase (GimpContext *context,
762762
&bytes_read, NULL, error);
763763

764764
/* Color formats */
765-
if (g_str_has_prefix (color_space, "RGB"))
765+
if (g_str_has_prefix (g_strstrip (color_space), "RGB"))
766766
{
767767
components = 3;
768768
src_format = babl_format ("R'G'B' float");
769769
}
770-
else if (g_str_has_prefix (color_space, "GRAY"))
770+
else if (g_str_has_prefix (g_strstrip (color_space), "GRAY"))
771771
{
772772
components = 1;
773773
src_format = babl_format ("Y' float");
774774
}
775-
else if (g_str_has_prefix (color_space, "CMYK"))
775+
else if (g_str_has_prefix (g_strstrip (color_space), "CMYK"))
776776
{
777777
components = 4;
778778
src_format = babl_format ("CMYK float");
779779
}
780-
else if (g_str_has_prefix (color_space, "LAB"))
780+
else if (g_str_has_prefix (g_strstrip (color_space), "LAB"))
781781
{
782782
components = 3;
783783
src_format = babl_format ("CIE Lab float");

0 commit comments

Comments
 (0)