fmw42 wrote: ↑2018-10-03T10:12:29-07:00
-tile-offset must come before the tiling. It represents a single global offset, not the spacing for the tiling.
You should be using magick ... -composite syntax rather than the older magick composite ... syntax.
I think you just want to composite the cat image multiple times at the desired locations. If the sequence is a regular offset, then you can write a script loop to do the positioning. But here is a manual way.
Code: Select all
magick stars.jpg \
cat.png -gravity northwest -geometry +X1+Y1 -compose over -composite \
cat.png -gravity northwest -geometry +X2+Y2 -compose over -composite \
...
cat.png -gravity northwest -geometry +Xn+Yn -compose over -composite \
result.jpg
Scripting is OS dependent.
Can you explain your offset sequence better so that I can understand how to script a loop over your X and Y changes?
YES! This is exactly what I am looking for!! Thank you!!!! The command structure is what was really confusing for me. as a test, I just did this
Code: Select all
magick bg.png \
head.jpg -gravity northwest -geometry +300+300 -compose over -composite \
head.jpg -gravity northwest -geometry +600+950 -compose over -composite \
result.jpg
which placed the head over an arbitry location over the background image. All i have to do is to just do do the math on the loop. It also gives me an option to use a different head because its alternating. This is awesome. Thank you!!
One last thing I noticed was that the bg.png file is original 12mb, the result if I used jpg output is around ~3mb, but if I change it to png, it will be around 12.5mb, I have a couple questions
1. can I stop compression from happening or atleast the level of compression for the result jpg?
2. If I choose to use PNG because its lossless, is it possible to change the colorspace to CMYK via Image magick?
3. when you say scripting is OS dependent, what does that mean exactly? right now this works on OSX, does it mean that on an linux enviroment, the command wouldnt work?
4. regarding -gravity northwest option, the documentation says
If the -gravity option is present with NorthEast, East, or SouthEast gravity, it gives the distance leftward from the right edge of the image to the right edge of the cropping region. Similarly, if the -gravity option is present with SouthWest, South, or SouthEast gravity, the distance is measured upward between the bottom edges.
It looks like its basically telling IM where the reference point is? am I understanding this correctly?