Fit objects optimizing areas.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Elapido
Posts: 42
Joined: 2011-06-10T14:27:28-07:00
Authentication code: 8675308

Fit objects optimizing areas.

Post by Elapido »

I don't know if Imagemagick is able to do this. If it isn't, I'd appreaciate if you tell me of any program that is designed for what I need. What I'd like is to provide some 2D vector objects, scaled with their real dimensiones in .ai or .eps format, for instance, and another larger vector object. The program should be able to place the objects inside the container optimizing the space, moving or rotating the objects for best fit.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Fit objects optimizing areas.

Post by fmw42 »

Imagemagick is primarily a raster processor and does not do much will vector files. It always converts them to raster format. I do not know of any program that will do what you want. But that is not to say, one might not exist. I am just not an expert on vector file manipulations.

see http://www.imagemagick.org/Usage/formats/#vector
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Fit objects optimizing areas.

Post by fmw42 »

If the vector files are converted to raster, then one, in principle, can use -mophology distance to find the largest square area inside some region. Then you can scale the other vector file to fit that region and insert in there.

see
http://www.imagemagick.org/Usage/morphology/#distance


I do something similar without morphology in my autolabel script at the link below, though not quite what you want.
Post Reply