[SOLVED]: Resizing/Cropping based on info from another image
Posted: 2019-02-11T03:31:51-07:00
Leading on from this topic:-
viewtopic.php?f=1&t=35471
and very similar to concepts discussed here:-
https://www.imagemagick.org/discourse-s ... hp?t=33209
Although, the condition is that it's simply a Windows BAT file and using IM6, would not involve any fancy scripting environment.
I would like to crop/resize an image to match the dimensions of another image, since the exact resolution could never be known for each case.
Although not involving fancy programming, storing and then retrieving info from a TXT file might do the trick? If IM has such a function?
I honestly have no idea but ideally it would be within one command and not involve extras, if it's possible at all?
Something like this ridiculous fantasy example:-
"convert input.png -resize(%w="match.png"x%h="match.png") output.png"
The fantasy result would be that output.png would be input.png but with the resolution of match.png.
viewtopic.php?f=1&t=35471
and very similar to concepts discussed here:-
https://www.imagemagick.org/discourse-s ... hp?t=33209
Although, the condition is that it's simply a Windows BAT file and using IM6, would not involve any fancy scripting environment.
I would like to crop/resize an image to match the dimensions of another image, since the exact resolution could never be known for each case.
Although not involving fancy programming, storing and then retrieving info from a TXT file might do the trick? If IM has such a function?
I honestly have no idea but ideally it would be within one command and not involve extras, if it's possible at all?
Something like this ridiculous fantasy example:-
"convert input.png -resize(%w="match.png"x%h="match.png") output.png"
The fantasy result would be that output.png would be input.png but with the resolution of match.png.