Sign up now! · Forgot password?
RSS/Atom feed Twitter

Using gimp-edit-copy / gimp-edit-paste

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

Using gimp-edit-copy / gimp-edit-paste Griff 23 Nov 17:20
  Using gimp-edit-copy / gimp-edit-paste Akkana Peck 25 Nov 02:42
   Using gimp-edit-copy / gimp-edit-paste Griff 25 Nov 11:03
2019-11-23 17:20:27 UTC (17 days ago)
postings
2
contact
Send private message

Using gimp-edit-copy / gimp-edit-paste

Hi, this seems like such an obvious question I can't help but feel like I am missing something incredibly simple. I have a little programing experience and I am trying to write a simple script to take slices out of a long panorama as layers which I will then export as a GIF to give the impression of panning across the scene.

I don't have not used python before. I can create the file for the layers and can get a rectangular selection, but I don't seem to be able to copy from the selection to the layers image.

At the moment I am running this via the Python-Fu console. The key parts of the code are:

# Create 3x2 layer file Stitch = pdb.gimp_image_new(Width, Height, RGB) pdb.gimp_display_new(Stitch)

# Select and copy 3x2 slice and paste into layer file Panorama = gimp.image_list()[0] # Previously opened panoramic image pdb.gimp_image_select_rectangle(Panorama, 0, X, Y, Width, Height) # select rectangle

If I try "pdb.gimp_edit_copy(Panorama)" I get the message "wrong parameter type". I have tried a number of things but don't seem to be getting anywhere.

Can anybody help?

Griff (via www.gimpusers.com/forums)
Akkana Peck
2019-11-25 02:42:26 UTC (15 days ago)

Using gimp-edit-copy / gimp-edit-paste

Griff writes:

# Select and copy 3x2 slice and paste into layer file Panorama = gimp.image_list()[0] # Previously opened panoramic image pdb.gimp_image_select_rectangle(Panorama, 0, X, Y, Width, Height) # select rectangle

If I try "pdb.gimp_edit_copy(Panorama)" I get the message "wrong parameter type". I have tried a number of things but don't seem to be getting anywhere.

gimp_edit_copy takes a drawable, not an image. Layers are drawables, so assuming your Panorama image only has one layer, try this:

pdb.gimp_edit_copy(Panorama.layers[0])

Hope that helps!

...Akkana

2019-11-25 11:03:00 UTC (15 days ago)
postings
2
contact
Send private message

Using gimp-edit-copy / gimp-edit-paste

Griff writes:

That works, thanks, it was exactly the sort of "before you try drive the car, start the engine" advice I was looking for!

Thanks again.

Griff (via www.gimpusers.com/forums)