Bug 565138 – python-fu-foggify does not check if image is in rgb mode

2008-12-21  Sven Neumann  <sven@gimp.org>

	Bug 565138 – python-fu-foggify does not check if image is in rgb 
mode

	* plug-ins/pygimp/plug-ins/foggify.py (foggify): fixed handling 
of
	grayscale images.


svn path=/trunk/; revision=27817
This commit is contained in:
Sven Neumann 2008-12-21 15:33:07 +00:00 committed by Sven Neumann
parent 4255e43681
commit 5700bd6003
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2008-12-21 Sven Neumann <sven@gimp.org>
Bug 565138 python-fu-foggify does not check if image is in rgb mode
* plug-ins/pygimp/plug-ins/foggify.py (foggify): fixed handling of
grayscale images.
2008-12-20 Martin Nordholts <martinn@svn.gnome.org> 2008-12-20 Martin Nordholts <martinn@svn.gnome.org>
Bug 555954 Merge Tagging of Gimp Resources GSoC Project Bug 555954 Merge Tagging of Gimp Resources GSoC Project

View file

@ -27,8 +27,12 @@ def foggify(img, layer, name, colour, turbulence, opacity):
gimp.context_push() gimp.context_push()
img.undo_group_start() img.undo_group_start()
fog = gimp.Layer(img, name, layer.width, layer.height, RGBA_IMAGE, if img.base_type is RGB:
opacity, NORMAL_MODE) type = RGBA_IMAGE
else:
type = GRAYA_IMAGE
fog = gimp.Layer(img, name,
layer.width, layer.height, type, opacity, NORMAL_MODE)
fog.fill(TRANSPARENT_FILL) fog.fill(TRANSPARENT_FILL)
img.add_layer(fog, 0) img.add_layer(fog, 0)