Gimp-Forum.net
flip images - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: flip images (/Thread-flip-images)



flip images - gimpygirl - 03-04-2024

Hi

See image

- from this image I generate layers: each layer is a square of the image. So the layers have the symbols as you see them (wrong orientation).

- I need an existing plugin or plugin code to flip the layers so they are in correct orientation. How can I do this with existing plugin or plugin code or gimp operation?
(only for A -> Z and 0 -> 9)


RE: flip images - Ofnuts - 03-04-2024

(03-04-2024, 02:37 AM)gimpygirl Wrote: Hi

See image

- from this image I generate layers: each layer is a square of the image. So the layers have the symbols as you see them (wrong orientation).

- I need an existing plugin or plugin code to flip the layers so they are in correct orientation. How can I do this with existing plugin or plugin code or gimp operation?
(only for A -> Z and 0 -> 9)

Did you try to search flip in the Procedure browser?

... but if you use flip you have to flip twice (H&V), os better do a 180° rotation (search rotate-simple)


RE: flip images - gimpygirl - 03-05-2024

What is the correct to,go through all layers of image?


RE: flip images - Tas_mania - 03-05-2024

In the layers box next to the eye you can see a chain link. Shift + click in that row links the layers. From there you can go to Layer > Group > pack linked layers. This makes them all behave like a single layer. Then Layer > Transform > flip horizontally.

I work with multiple layers like this often. You can also resize them. When done just unpack and unlink. Smile


RE: flip images - gimpygirl - 03-05-2024

(03-05-2024, 07:12 AM)Tas_mania Wrote: In the layers box next to the eye you can see a chain link. Shift + click in that row links the layers. From there you can go to Layer > Group > pack linked layers. This makes them all behave like a single layer. Then Layer > Transform > flip horizontally.

I work with multiple layers like this often. You can also resize them. When done just unpack and unlink. Smile

Thanks but I was also looking for the correct code to loop through all layers of image. I'm making a plugin


RE: flip images - rich2005 - 03-05-2024

(03-05-2024, 05:52 PM)gimpygirl Wrote:
(03-05-2024, 07:12 AM)Tas_mania Wrote: In the layers box next to the eye you can see a chain link. Shift + click in that row links the layers. From there you can go to Layer > Group > pack linked layers. This makes them all behave like a single layer. Then Layer > Transform > flip horizontally.

I work with multiple layers like this often. You can also resize them. When done just unpack and unlink. Smile

Thanks but I was also looking for the correct code to loop through all layers of image. I'm making a plugin

Well, for an "apply to all layers", the attached snippet of code works for me. Equivalent is Layer -> Transform -> Flip Vertically for each layer.

You could of course just flip the whole image Image -> Transform -> Flip Vertically then no need to cycle through the layers.


RE: flip images - Tas_mania - 03-06-2024

Sorry I didn't realize you were making a plug-in. Good luck with it Smile