Search found 40 matches

by kimmyk
2019-05-10T14:23:32-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

Yes, I remembered you wanted randomness. If you want only random rotation without translation, replace "-repage +%%[fx:rand()*20-10]+%%[fx:rand()*20-10]" with "+repage". "rand()" is a random number between 0.0 and 1.0, so "%%[fx:rand()*30-15]" is a random num...
by kimmyk
2019-05-10T07:30:41-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

I'll report back with some more test results when I have changed the scripts.
Cheers.
by kimmyk
2019-05-10T07:11:40-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

You might want some jitter , randomness of the hearts over the circles, while keeping the circles in a fixed grid. My code above duplicates heart-over-circle, so can't provide jitter. A solution is to first duplicate the circles and the hearts, then "-layers composite" with jitter. The he...
by kimmyk
2019-05-10T04:52:42-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

loyalty-card-botox_9991001.jpg is the image of lips, with white circles as placeholders for the stamps, correct? Then the heart-stamps should be placed on the placeholders. I can't find where you have posted loyalty-card-botox_9991001.jpg, or code that makes it. That means I can't test your code, o...
by kimmyk
2019-05-10T01:27:27-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

Then you need two offsets. The second could be: -set option:offset2 "%[fx:h/2+15]" ... then use: -geometry +0+%[offset2] I really appreciate your patience here snibgo, however that is still not the issue. I'll try to explain once more, step by step, otherwise I will have to settle for ful...
by kimmyk
2019-05-09T14:57:06-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

Yes, the alignment of the stamps is wrong as in the 6 grid image shows the stamps don't match the placeholders on some occassions. What if I need the +15 added to the offset (which is half the image size). I tried to add it inside the brackets weeks ago but that did not work, this is the only variat...
by kimmyk
2019-05-09T14:11:24-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

I assume "loyalty-card-botox_9991001.jpg" in your script is the file you have linked as "loyalty-card-lips-backup.jpg". Your script has... -geometry -0+%%[offset]+15 ... which is bad syntax. There should be only two numbers prefixed by "+" or "-". The "-...
by kimmyk
2019-05-09T12:57:55-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

Okay, but the piping "|" in your command goes nowhere, because what follows it is an image filename instead of an executable. loyalty.sh: line 1: loyalty-card-botox_9991001.jpg: command not found Sorry, that is a paste error since I deleted the paths to my server and accidentally deleted ...
by kimmyk
2019-05-09T08:39:03-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

Ok. I use these to create a stampcard, people can choose how many stamps/placeholders they want to use: https://socialsource.nl/clients/aps/api/lc/templates/loyalty-card-lips-backup.jpg and the blank placeholder: https://socialsource.nl/clients/aps/api/lc/templates/stamp000.png That works fine, as i...
by kimmyk
2019-05-09T07:44:22-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

I'm back, I can't get it to work 100% as I intend to and maybe you guys know some way to get it right. 1. I make a template dynamically with the placeholders for stamp, for example according to the following structure: switch ($nr_of_stamps) { case ($nr_of_stamps == 10): $tile = "5x"; brea...
by kimmyk
2019-04-08T04:30:29-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

snibgo wrote: 2019-04-08T02:50:23-07:00 In the montage, "miff:-" at the end means the output will be written in miff format to stdout, so it goes through the pipe. In magick, "-" in an input position means the input will be read from stdin, which here is a pipe.
Thanks
by kimmyk
2019-04-08T00:00:13-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

You can use magick to rotate the image randomly and then pipe to magick montage. Here I alternate the rotation direction for each copy. magick rose: -duplicate 4 -background none -rotate "%[fx:sign(mod(t,2)-1)*30*rand()]" miff:- | magick montage - -tile 3x -geometry +5+5 -background none ...
by kimmyk
2019-04-07T05:36:33-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

Okay, I finally got it exactly as I need it. Just 2 more questions of minor importance. I have two command working, and I merge the stamps from cmd1 into the image with cmd2. These are just some variables I will use later: $input = "loyalty-card-lips.png"; $stamps = "stamp.png"; ...
by kimmyk
2019-04-06T06:06:19-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

snibgo wrote: 2019-04-06T05:53:19-07:00
kimmyk wrote:how do i just reapeat the same image X times? ... I can also use a cool -rotate

Code: Select all

magick rose: -bordercolor None -border 10 -duplicate 9 -background None -rotate %[fx:rand*10-5] +append out.png
That looks like a plan ;-) Although it leaves out the tile feature now.
by kimmyk
2019-04-06T02:42:17-07:00
Forum: Users
Topic: Is it possible to calculate width and paste min/max images in a row/column?
Replies: 36
Views: 21587

Re: Is it possible to calculate width and paste min/max images in a row/column?

You can montage all the stamp images together (using -geometry +0+0 so the touch) and then use my command above to resize the montaged stamps to the same width as the blue image. I guess it is safe to assume I can also use a cool -rotate [php]rand(0,360)[/php] command in there to give them a little...