mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 13:42:40 +02:00
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 ().
This commit is contained in:
@@ -762,22 +762,22 @@ gimp_palette_load_ase (GimpContext *context,
|
|||||||
&bytes_read, NULL, error);
|
&bytes_read, NULL, error);
|
||||||
|
|
||||||
/* Color formats */
|
/* Color formats */
|
||||||
if (g_str_has_prefix (color_space, "RGB"))
|
if (g_str_has_prefix (g_strstrip (color_space), "RGB"))
|
||||||
{
|
{
|
||||||
components = 3;
|
components = 3;
|
||||||
src_format = babl_format ("R'G'B' float");
|
src_format = babl_format ("R'G'B' float");
|
||||||
}
|
}
|
||||||
else if (g_str_has_prefix (color_space, "GRAY"))
|
else if (g_str_has_prefix (g_strstrip (color_space), "GRAY"))
|
||||||
{
|
{
|
||||||
components = 1;
|
components = 1;
|
||||||
src_format = babl_format ("Y' float");
|
src_format = babl_format ("Y' float");
|
||||||
}
|
}
|
||||||
else if (g_str_has_prefix (color_space, "CMYK"))
|
else if (g_str_has_prefix (g_strstrip (color_space), "CMYK"))
|
||||||
{
|
{
|
||||||
components = 4;
|
components = 4;
|
||||||
src_format = babl_format ("CMYK float");
|
src_format = babl_format ("CMYK float");
|
||||||
}
|
}
|
||||||
else if (g_str_has_prefix (color_space, "LAB"))
|
else if (g_str_has_prefix (g_strstrip (color_space), "LAB"))
|
||||||
{
|
{
|
||||||
components = 3;
|
components = 3;
|
||||||
src_format = babl_format ("CIE Lab float");
|
src_format = babl_format ("CIE Lab float");
|
||||||
|
Reference in New Issue
Block a user