Hi
I have this plugin that just runs some other scripts and plugins.
I want to add the first 2 comments lines. Can somebody tell me if this is possible and fill in the required code?
The plugin works but the 2 first comment lines I don't know how to code it.
First I want to add an alpha layer to my image.
Then I want to apply "select by color" tool on a specified pixel (X and Y value of the pixel) and delete the selection from the whole image automatically? Is this possible using code?
	
	
	
	
I have this plugin that just runs some other scripts and plugins.
I want to add the first 2 comments lines. Can somebody tell me if this is possible and fill in the required code?
The plugin works but the 2 first comment lines I don't know how to code it.
First I want to add an alpha layer to my image.
Then I want to apply "select by color" tool on a specified pixel (X and Y value of the pixel) and delete the selection from the whole image automatically? Is this possible using code?
Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from gimpfu import*
def test(timg, tdrawable):
#how to add alpha layer to my image?
#how to apply "select by color" tool on a specified pixel and delete the selection from  the whole image?
#determine the offset values manually
    pdb.gimp_drawable_offset(tdrawable, 0, 1, 18, -32) 
    
    
#the image size is constant and 150x150 crops the border    
    pdb.gimp_image_crop(timg, 2400, 1200, 150, 150)
    
    
#guides using script-fu     
    pdb.script_fu_grid_guides(timg, 0, 150, 150, 1, 0) 
    
    
#chop into 150x150 tiles    
    pdb.python_fu_ofn_guillotine_layer(timg, tdrawable)
    
    
#export all layers
    pdb.python_fu_ofn_export_layers(timg, os.path.dirname(timg.filename), "{numUp0}.png", "-", 0)
    
    
register(
        "test",
        "test",
        "test",
        "*",
        "*",
        "2024",
        "<Image>/Tools/test...",
        "*",
        [],
        [],
        test
        )
main()
