Get and save image dimension in memory?
Posted: 2017-05-08T15:23:39-07:00
Hello,
I was wondering if it's possible to get an image dimension and then save it into memory for later use, like the following:
When you don't supply the height for -size when using the caption command and just the width, the height is automatically determined for your image/text which is great and really glad it's capable of doing this, but what if I want to find out what the height from the caption command will be without having to write the image to disk but to memory instead so that I can use the height for something else?
Thanks in advance.
I was wondering if it's possible to get an image dimension and then save it into memory for later use, like the following:
Code: Select all
convert \( -size 400 -background transparent caption:”this is some text“ -write mpr:captionText +delete \) \( mpr:captionText -format "%[fx:h]" INFO: -write mpr:imgWidth +delete \)
Thanks in advance.