mirror of https://github.com/GNOME/gimp.git
Add alpha automatically on colortoalpha plug-in.
This commit is contained in:
parent
f9ea721238
commit
9bc546c1ad
|
@ -1,3 +1,8 @@
|
||||||
|
2000-12-16 Seth Burgess <sjburges@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/common/colortoalpha.c: Change to accecpt RGB input
|
||||||
|
(automatically add an alpha channel if needed).
|
||||||
|
|
||||||
2000-12-16 Sven Neumann <sven@gimp.org>
|
2000-12-16 Sven Neumann <sven@gimp.org>
|
||||||
Jens Lautenbacher <jtl@gimp.org>
|
Jens Lautenbacher <jtl@gimp.org>
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ query (void)
|
||||||
"Seth Burgess <sjburges@gimp.org>",
|
"Seth Burgess <sjburges@gimp.org>",
|
||||||
"7th Aug 1999",
|
"7th Aug 1999",
|
||||||
N_("<Image>/Filters/Colors/Color to Alpha..."),
|
N_("<Image>/Filters/Colors/Color to Alpha..."),
|
||||||
"RGBA",
|
"RGB*",
|
||||||
GIMP_PLUGIN,
|
GIMP_PLUGIN,
|
||||||
nargs, 0,
|
nargs, 0,
|
||||||
args, NULL);
|
args, NULL);
|
||||||
|
@ -184,9 +184,13 @@ run (gchar *name,
|
||||||
|
|
||||||
if (status == GIMP_PDB_SUCCESS)
|
if (status == GIMP_PDB_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Make sure that the drawable is indexed or RGB color */
|
/* Add alpha if not present */
|
||||||
|
gimp_layer_add_alpha (drawable->id);
|
||||||
|
drawable = gimp_drawable_get (drawable->id);
|
||||||
|
|
||||||
|
/* Make sure that the drawable is RGB color */
|
||||||
if (gimp_drawable_is_rgb (drawable->id) &&
|
if (gimp_drawable_is_rgb (drawable->id) &&
|
||||||
gimp_drawable_has_alpha(drawable->id))
|
gimp_drawable_is_layer (drawable->id))
|
||||||
{
|
{
|
||||||
if (run_mode != GIMP_RUN_NONINTERACTIVE)
|
if (run_mode != GIMP_RUN_NONINTERACTIVE)
|
||||||
gimp_progress_init ("Removing color...");
|
gimp_progress_init ("Removing color...");
|
||||||
|
|
Loading…
Reference in New Issue