gimp_xcf.py revision 8043973aa29d98ea8b44972befabae9347d46be6
'''
Copyright (C) 2006 Aaron Spike, aaron@ekips.org
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
import inkex
pass
#create os temp dir
area = '--export-area-canvas'
pngs = []
names = []
path = "/svg/*[name()='g' or @style][@id]"
f.read()
f.close()
script_fu = """
(define
(png-to-layer img png_filename layer_name)
(let*
(
(png (car (file-png-load RUN-NONINTERACTIVE png_filename png_filename)))
(png_layer (car (gimp-image-get-active-layer png)))
(xcf_layer (car (gimp-layer-new-from-drawable png_layer img)))
)
(gimp-image-add-layer img xcf_layer -1)
(gimp-drawable-set-name xcf_layer layer_name)
)
)
(let*
(
(img (car (gimp-image-new 200 200 RGB)))
)
(gimp-image-undo-disable img)
(let* ((filelist '(%s))(namelist '(%s)))
(while filelist
(let* ((filename (car filelist))(layername (car namelist)))
(png-to-layer img filename layername)
)
(set! filelist (cdr filelist))
(set! namelist (cdr namelist))
)
)
(gimp-image-resize-to-layers img)
(gimp-image-undo-enable img)
(gimp-file-save RUN-NONINTERACTIVE img (car (gimp-image-get-active-layer img)) "%s" "%s"))
(gimp-quit 0)
f.close()
x.close()
e = MyEffect()
e.affect()