Page 1 of 1

Measurement between transparent images

Posted: 2017-02-21T18:05:36-07:00
by markus71
Hello,

We are looking for help with our Website Builder application.

We have integrated a measurement tool which shows the exact pixel difference between elements. Like text elements, images, etc.

If you download the image below:
https://www.dropbox.com/s/tkg14j2odt2u2 ... t.png?dl=0

You can see that the issue is that the two images are transparent png's with the same Background color as the page (black). Our measurement tool is measuring distances to the image container borders. What we want is to measure distance to the actual image within the black Background. We would need to breakdown the image properties in order to get the dimensions and then calculate the distance..

Any suggestions will be much appreciated.

Thank you,
Mark

Re: Measurement between transparent images

Posted: 2017-02-21T18:59:48-07:00
by fmw42
Please do not post to two different forums. If your post in the Consulting Forum is not for PAID consulting, let us know and we will remove that post. I have moved this to the User's forum.

Your link is broken. I get a 404 Not Found Error.

Re: Measurement between transparent images

Posted: 2017-02-21T19:04:55-07:00
by fmw42
I have copied your link over from your other post.

https://www.dropbox.com/s/tkg14j2odt2u2 ... t.png?dl=0

But there is only one image. So I am not sure about your comparison of two images?

The one image is a Forbes Wall Street Journal image and has NO alpha channel, so not transparent. Is that the correct image?

Please clarify what you need done with this image. Also please identify your IM version and platform.

Re: Measurement between transparent images

Posted: 2017-02-21T19:16:49-07:00
by markus71
Hi,

Thank you for your response. I created a quick video that should provide more clarification:
https://mark-onlybusiness.tinytake.com/ ... 80OTY1NDg3

You can see the distance measurement between the two images - "Forbes" and "The Wall Street Journal" You can see the distance measured (in orange) measures to the blue container of "The Wall Street Journal" where we actually want to measure it to the top of the letters "THE WALL' and the bottom of the letters "JOURNAL". So the WSJ image is transparent where it should be measuring to the words only not the container.

Hope this provides some further clarification :)
Cheers,
Mark

Re: Measurement between transparent images

Posted: 2017-02-21T20:33:33-07:00
by fmw42
Sorry I cannot connect the audio with the image? The audio is also very hard to understand due to the echo. Your image from earlier is not transparent, so I am not sure what it is you want to have done. Please clarify further.

You might look at -morphology distance, if you want to measure distances in an image. See http://www.imagemagick.org/Usage/morphology/#distance

Otherwise, I do not see how Imagemagick will help you.

Re: Measurement between transparent images

Posted: 2017-02-21T20:55:49-07:00
by snibgo
The question is too vague for a meaningful answer. However ...

If an image has a solid-colour background, and contains elements of other colours (these elements being text or graphics or whatever), it is easy to find the horizontal or vertical distance between the elements.

There are many methods to do this. For example, make the background black and all other colours white, then scale the image to a single column. In this column, black pixels represent the vertical distance between elements, so these can be easily calculated.

But if you have a dozen elements and you want the vertical distance between two particular elements, how do you specify which elements are to be measured?