mirror of https://github.com/GNOME/gimp.git
app: make masks use linear, not gamma corrected formats
This commit is contained in:
parent
3e9fdf1815
commit
03da4fb280
|
@ -208,7 +208,7 @@ gimp_image_contiguous_region_by_color (GimpImage *image,
|
||||||
mask_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (mask));
|
mask_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (mask));
|
||||||
|
|
||||||
gegl_buffer_iterator_add (iter, mask_buffer,
|
gegl_buffer_iterator_add (iter, mask_buffer,
|
||||||
NULL, 0, babl_format ("Y' u8"),
|
NULL, 0, babl_format ("Y u8"),
|
||||||
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
|
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
|
||||||
|
|
||||||
while (gegl_buffer_iterator_next (iter))
|
while (gegl_buffer_iterator_next (iter))
|
||||||
|
|
|
@ -153,6 +153,10 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
{
|
{
|
||||||
buf->format = babl_format ("R'aG'aB'aA u8");
|
buf->format = babl_format ("R'aG'aB'aA u8");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_warn_if_reached ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
|
|
|
@ -1529,7 +1529,7 @@ gimp_image_get_mask_format (const GimpImage *image)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||||
|
|
||||||
return babl_format ("Y' u8");
|
return babl_format ("Y u8");
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
|
|
|
@ -37,7 +37,8 @@ gimp_babl_format_get_image_type (const Babl *format)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (format != NULL, -1);
|
g_return_val_if_fail (format != NULL, -1);
|
||||||
|
|
||||||
if (format == babl_format ("Y' u8"))
|
if (format == babl_format ("Y u8") ||
|
||||||
|
format == babl_format ("Y' u8"))
|
||||||
return GIMP_GRAY_IMAGE;
|
return GIMP_GRAY_IMAGE;
|
||||||
else if (format == babl_format ("Y'A u8"))
|
else if (format == babl_format ("Y'A u8"))
|
||||||
return GIMP_GRAYA_IMAGE;
|
return GIMP_GRAYA_IMAGE;
|
||||||
|
@ -61,7 +62,8 @@ gimp_babl_format_get_base_type (const Babl *format)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (format != NULL, -1);
|
g_return_val_if_fail (format != NULL, -1);
|
||||||
|
|
||||||
if (format == babl_format ("Y' u8") ||
|
if (format == babl_format ("Y u8") ||
|
||||||
|
format == babl_format ("Y' u8") ||
|
||||||
format == babl_format ("Y'A u8"))
|
format == babl_format ("Y'A u8"))
|
||||||
{
|
{
|
||||||
return GIMP_GRAY;
|
return GIMP_GRAY;
|
||||||
|
|
|
@ -504,7 +504,8 @@ gimp_color_frame_update (GimpColorFrame *frame)
|
||||||
switch (frame->frame_mode)
|
switch (frame->frame_mode)
|
||||||
{
|
{
|
||||||
case GIMP_COLOR_FRAME_MODE_PIXEL:
|
case GIMP_COLOR_FRAME_MODE_PIXEL:
|
||||||
if (frame->sample_format == babl_format ("Y' u8") ||
|
if (frame->sample_format == babl_format ("Y u8") ||
|
||||||
|
frame->sample_format == babl_format ("Y' u8") ||
|
||||||
frame->sample_format == babl_format ("Y'A u8"))
|
frame->sample_format == babl_format ("Y'A u8"))
|
||||||
{
|
{
|
||||||
names[0] = _("Value:");
|
names[0] = _("Value:");
|
||||||
|
|
Loading…
Reference in New Issue