"Version: ImageMagick 7.0.7-28 Q16 x64 2018-03-25"
Hi, I'm trying to figure out how to scroll a tiling image, so when I shift/translate it x/y, whatever exceeds the bounds of the image will repeat on the opposite side.
Something like this:-
https://www.parallelcube.com/wp_install ... roll-0.gif
I can't figure it out, so at the moment I am making a matrix of 3x3, using "page" and then cropping the center tile. This works but is likely a workaround and much slower.
Is there a quicker way to do this that doesn't rely on always creating a 3x3 matrix and just retains the original resolution of the image?
Scrolling a tiling image that repeats
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Scrolling a tiling image that repeats
You have linked to an animated gif that doesn't seem related to your question.
I don't understand your method of "making a matrix of 3x3, using "page" and then cropping the center tile". If you showed actual commands, I might understand.
Perhaps "-roll" is what you need. See http://www.imagemagick.org/script/comma ... s.php#roll
I don't understand your method of "making a matrix of 3x3, using "page" and then cropping the center tile". If you showed actual commands, I might understand.
Perhaps "-roll" is what you need. See http://www.imagemagick.org/script/comma ... s.php#roll
snibgo's IM pages: im.snibgo.com
Re: Scrolling a tiling image that repeats
Thanks, "roll" was exactly what I was looking for!
Now I have a new issue with it, I wanted to do it by a percentage, like 1/8 or 1/16, so 0.125%% or 0.0625%%, but it seems like the command-line doesn't like it for this operation, or doesn't like these kind of percentages. The issue is, I don't know exactly what resolution the file might be (thus what roll "pixels" I should be using) but a percentage would always give me the number of frames I want.
Now I have a new issue with it, I wanted to do it by a percentage, like 1/8 or 1/16, so 0.125%% or 0.0625%%, but it seems like the command-line doesn't like it for this operation, or doesn't like these kind of percentages. The issue is, I don't know exactly what resolution the file might be (thus what roll "pixels" I should be using) but a percentage would always give me the number of frames I want.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Scrolling a tiling image that repeats
Percentages work fine with recent versions of IM. For example, with 7.0.7-28:
Note that 1/8 is 12.5%, not 0.125%. If used in Windows BAT scripts, double the percentage sign.
Code: Select all
magick logo: -roll +50%+0 x.png
snibgo's IM pages: im.snibgo.com
Re: Scrolling a tiling image that repeats
Oh wow, how silly of me. Helps if I get the percentages correct, hey.
Thanks snibgo!!!
Thanks snibgo!!!