Resize image to 80% of "mother"-image

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
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Resize image to 80% of "mother"-image

Post by Bonzo »

I do not think there is a way to do this; if you were using php you could do it using the getimagesize( ) function.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Resize image to 80% of "mother"-image

Post by anthony »

There is not simple direct way to do this. You really need to do the specialized calculation yourself.

When I have time I was planning to enhance settings and arguments to allow the the use of 'format percent escapes' in geometry arguments, which would allow you to extract the width of an image already in memory to resize another image, (see IM Examples, Future proposals) but this not simple and is far down my list of 'things I'm adding to IM', so it may be a long time.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply