Commit 5700bd60 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

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
parent 4255e436
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>
Bug 555954 Merge Tagging of Gimp Resources GSoC Project
......
......@@ -27,8 +27,12 @@ def foggify(img, layer, name, colour, turbulence, opacity):
gimp.context_push()
img.undo_group_start()
fog = gimp.Layer(img, name, layer.width, layer.height, RGBA_IMAGE,
opacity, NORMAL_MODE)
if img.base_type is RGB:
type = RGBA_IMAGE
else:
type = GRAYA_IMAGE
fog = gimp.Layer(img, name,
layer.width, layer.height, type, opacity, NORMAL_MODE)
fog.fill(TRANSPARENT_FILL)
img.add_layer(fog, 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment