Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotate Blue image every 5 degree
I have one of these image below here.
I would like to select the blue area, and rotate it every 30 degree. For every rotate, i would like it to be a separate layer. Is there any script to do this?

[Image: a2nxYQ.jpg]
Since your image is circular, you can just as well rotate the whole layer (always rotate from initial position, accumulate rotations would add blurriness) Some script fot this, including my own ofn-rotate-layer.

However, given the simplicity of the image it is much simper and clean to recreate it, with some scripts of mine:
  • Generate a dial with 12 marks , 30 degrees apart going from a radius of 75 to a radius of 95 (ofn-dial-marks)
  • Explode each dial mark to its own path (ofn-path-edit/Break path apart)
  • Fill each of these path with blue, on its own transparent layer (ofn-stroke-fill-path)
  • Create a circular path with a 85px radius (ofn-path-to-shape)
  • Add a transparent layer, Edit>Stroke path with a 20px line (not a script of mine Angel )
  • Make that new layer invisible, copy/merge it to the other layers (ofn-interleave-layers)

The GIF:


The WebP (better format, click on attachment icon it to see animation, and see how clean/smooth it is)

.webp   Spinner.webp (Size: 9.53 KB / Downloads: 27)

The XCF (before the ofn-interleave-layers step, which generates a new image)

.xcf   Spinner.xcf (Size: 83.75 KB / Downloads: 16)

My general scripts (ofn-rotate-layer, ofn-interleave-layers) are here.

My path-related scripts (all others) are here.
(12-17-2019, 09:38 PM)AmazingGimp Wrote: I have one of these image below here.
I would like to select the blue area, and rotate it every 30 degree. For every rotate, i would like it to be a separate layer. Is there any script to do this?

[Image: a2nxYQ.jpg]

5⁰ or 30⁰ ? Let you sort that out Wink

An alternative nearly in line with your request, you need to make a new layer with the tick. 

For a series of rotated layers, an old script-fu script-fu-copy-rotate-nLayer.scm from the defunct plugin-registry site:
Select your 'tick' apply the script (bottom of select menu)   screenshot  gives this:
As an animated gif in combine mode

[Image: 50Pb8wc.gif]

For a single tick to rotate, combine the background with the layers Using another old script sg-combine-bg.scm as:  and as an animated gif in replace mode:

[Image: APDaaKH.gif]

Both those scripts attached. Unzip, put in your Gimp profile scripts folder 

Attached Files
.zip (Size: 2.18 KB / Downloads: 15)
In the example given in the first post, the blue area extends without interleaving. So I figured the desired would be something like:

Attached Files Image(s)
For this, just make a circle path and use my ofn-path-animation, then merge as above on the grey ring:


Click for animation on the Webp (cleaner and 1/5th the file size...)

.webp   Spinner2.webp (Size: 23.33 KB / Downloads: 20)

It is also easy to do more steps (360) and have a round end:

.webp   Spinner2-360.webp (Size: 128.65 KB / Downloads: 23)
There is also
Oh my goodness, you guys are great!
I am going to try the method ofnuts and rich2005 have.
My next question is, i would like to have 360 images at different position save as Circle_000 up to Circle360.png.

The reason for that is because the screen design software that i have only supports import of png images, and the screen will communicate with a controller which tells the screen which images to utilize.
Try ofn-export-layers (in the repositories mentioned above) Smile
Hi OfNuts,

Looks like I am pretty bad at following directions for hours and i'm only stuck at step 3 Sad, plus this is my comeback in graphic after decades.

I am at this step "Create a circular path with a 85px radius (ofn-path-to-shape)"
I right click on one of the 12 path, shapes --> onsegement/on strokes --> circle (Radius,consecutive), it drew multiple circles instead.
Could you help me create a more detail guide, or small video that i can see how you utilize your scripts? I really would like to learn them, at the same time, have tasks at hand that needs completion.

Attached Files Image(s)
To create a circular path with a 85px radius, you

1. Create a new path, with a single segment that is 85px long and starts at the center of the circle (or is 170px long and is a diameter of the future circle)
2. In the Path list, right-click on it and use Shapes>On segments>Circles

Forum Jump: