Automated process to apply to image?

If you see this video, it gives a nice tip to do a zoom transition using #Kdenlive. I wonder if there is a way to automate the #GIMP part of the process in case one would want to use various images… maybe a script or a #GMIC effect? What do you recommend?

1 Like

@frd You mean like this?

yes :slight_smile:

I used G’MIC (CLI) to create that image

gmic -sp tiger .x2 -mirror[0] y -mirror[2] y -a y .x2 -mirror[0] x -mirror[2] x -a x -o sample.png

but it could easily be adapted for the G’MIC GIMP plugin.

Let me break it down in case you aren’t used to reading such a command.

  1. Source image.
  2. Duplicate image so that we have 3 tigers in total.
  3. Flip the first and third tiger.
  4. Tile-merge them vertically into one layer.
  5. Duplicate the layer so that we have 3 sets of tigers.
  6. Flip the first and third sets.
  7. Tile-merge horizontally.

This saves some alignment time.

thanks so much :heart: :smile: , but found some bugs maybe with gmic… notice how some artifacts appear on the top of the produced image. Also notice the result is different when converted to png or jpg.

original image:

saved as jpg:

saved as png:

Also the increase in size is drammatic. A 6MB image produced a 200MB one and a 600KB produced a 13MB. Is there a way to control this in your command?

PS
Forgive the image I used it was the smallest I could find on my PC. :stuck_out_tongue:

Hey @David_Tschumperle, have you seen anything like this? Is it a bug?

Don’t forget to replace -sp tiger, etc., with your filename :wink:. The reason for the larger size is that it is 9x larger. You may want to resize it or at least save it as a JPG, which is considerably smaller than a PNG.

Sizes:
Original image → 532.29 KB
Resultant JPG → 7.04 MB
Resultant PNG → 11.62 MB

I got the part of the tiger replacement :slight_smile:.

About the size, well the growth is crazy, because technically shouldn’t it increase 9x insize only?

As for the artifacts I see it didn’t happen, maybe it is a bug in my version of GMIC (2.0.0)?

I am using version 2.0.1. The latest stable is 2.0.2. It won’t hurt to upgrade.

Size Issue
Adjust the quality of the output JPG. Your original is likely not 100% so saving it at 100% (G’MIC default) would make the file substantially larger. E.g., if I were to save it to 98%,

-o sample.jpg,98

it would roughly be 9x larger (4.20 MB). At 98%, there is no perceptual difference; in fact, GIMP confidently exports JPGs at 90% by default. Read the GIMP docs for more info.

In general, try different things like I have and read the docs or search this forum. Chances are the answers are relatively straightforward :wink:.

Cheers :smiley: