Hi GeeMack and fmw42,
thanks so much for your quick replies and help, I really do appreciate it.
GeeMack wrote:There are a few ways to approach this. Is it something you'll be doing for many files, or just a one-off?
This will be for many files.
Basically, I'm starting with a 10,000px by 10,000px image and scaling down to multiple different canvas sizes. From there, I'd like to have the ability to tile the image across the canvas.
My thought was to have a script scale the image down to size and then tile the leftover area without getting cut off.
For example, 10,000x10,000 image proportionally scales down to a 2000px height canvas, and then repeats horizontally across canvas (from center) without the tiles going off the edges of the new canvas size.
GeeMack wrote:Are the tile sizes always the same? The canvas size? And what version of IM are you using?
The original image will be very large, but might not always be square.
The canvas size will vary as well.
Basically I want to fit the original image to the new size, proportionally, and then tile the image from the center
if there's enough room to tile (either horizontally or vertically or both) the original scaled image.
I'm using:
Version: ImageMagick 6.9.3-0 Q16 x86_64 2016-02-19
fmw42 wrote:If you know your tile size, you can compute the canvas size you need in odd multiples of the tile size. Use that canvas size and it will always have a tile in the center and never go off the canvas.
try this (unix)
Ooooooh, that's awesome! It's almost exactly what I need!!!
This is very helpful. Looking at this code gives me a good idea how to get the exact result I am looking for.
I will post the final version back here if I end up figuring out how to modify to suit my exact needs.
Thanks fmw42, this example code is very helpful!
Thanks again GeeMack and fmw42, I really appreciate your help.
I'll be back with my code modifications.