Reputation: 13
How to use an external command to make an edit of pic in the gimp and then return the result to the stage in a plugin or script.
Example in shell script.:
magick label.gif +matte
( +clone -shade 110x90 -normalize -negate +clone -compose Plus -composite )
( -clone 0 -shade 110x50 -normalize -channel BG -fx 0 +channel -matte )
-delete 0 +swap -compose Multiply -
The command above (imagemagick app) create a gif and i want put back in gimp stage. May be other simple option or application, but i need of return the edited back to gimp. Python, script fu? Thanks so much.
Upvotes: 1
Views: 382
Reputation: 8904
There is a shellout.py
Gimp plugin floating around from which you can borrow code. Typically:
pdb.gimp_layer_new_from_visible()
)subprocess.Popen()
and a list of argumentspdb.gimp_file_load_layer()
Upvotes: 1
Reputation: 53154
If GIMP will take stdin, then pipe from ImageMagick to GIMP using the GIMP XCF file format.
magick label.gif +matte
( +clone -shade 110x90 -normalize -negate +clone -compose Plus -composite )
( -clone 0 -shade 110x50 -normalize -channel BG -fx 0 +channel -matte )
-delete 0 +swap -compose Multiply XCF:- | GIMP -
Upvotes: 0