« CURL Custom Function | Home | Three weeks till year… »

GraphicsMagick in FileMaker, part 13

🎄
13 of 24

Welcome to the 13th door of our advent calendar. In this advent calendar I would like to take you on a journey through the GraphicsMagick component in December. Every day I will introduce you to one or more functions from this component. In this component you will find functions with which you can analyze images, convert them, change them with filters, draw them and much much more. In the end, you too can take the magic of GraphicsMagick to your images. I wish you a lot of fun in the process.

The GraphicsMagick also provides many effects that we can apply to our images. In the Advent calendar we would like to introduce a few of these effects. Today I will introduce you to the Swirl effect. With this effect you can turn the center of your image. We use the function GMImage.Swirl for this purpose. In the parameters we can specify the reference and the angle by which the image should be rotated.

Set Variable [ $GM ; Value: MBS("GMImage.NewFromContainer"; GraphicsMagick Advent::Image) ] 
Set Variable [ $r ; Value: MBS( "GMImage.Swirl"; $GM; -90 ) ] 
Set Field [ GraphicsMagick Advent::Image ; MBS( "GMImage.WriteToContainer"; $GM ; "abc.png" ) ] 
Set Variable [ $r ; Value: MBS( "GMImage.ReleaseAll" ) ] 

When we specify a positive value we create a counterclockwise rotation.

In case of a negative value, a clockwise rotation.

The effect is reversible. This means that if you first use the function with a value of +90 degrees and then apply the function to the image with -90 degrees, we will see the original image again. The function can also be applied several times in succession.

I wish you a lot of fun turning the head of your portraits

Previous day   Next day

13 12 22 - 08:24