app: add gimp_drawable_get_babl_format()

This commit is contained in:
Michael Natterer
2012-03-16 00:01:34 +01:00
parent 2a279f5e40
commit 54108d9413
2 changed files with 9 additions and 0 deletions

View File

@ -1812,6 +1812,14 @@ gimp_drawable_fill_by_type (GimpDrawable *drawable,
gimp_drawable_fill (drawable, pattern ? NULL : &color, pattern);
}
const Babl *
gimp_drawable_get_babl_format (const GimpDrawable *drawable)
{
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
return gimp_bpp_to_babl_format (gimp_drawable_bytes (drawable), TRUE);
}
gboolean
gimp_drawable_has_alpha (const GimpDrawable *drawable)
{

View File

@ -222,6 +222,7 @@ void gimp_drawable_fill_by_type (GimpDrawable *drawable,
GimpContext *context,
GimpFillType fill_type);
const Babl * gimp_drawable_get_babl_format (const GimpDrawable *drawable);
gboolean gimp_drawable_has_alpha (const GimpDrawable *drawable);
GimpImageType gimp_drawable_type (const GimpDrawable *drawable);
GimpImageType gimp_drawable_type_with_alpha (const GimpDrawable *drawable);