0

I have an image, and I would like to divide it into different sections. When the mouse is hovered over each section, I would like that section to be highlighted with a red box and a text box of some annotations appear. Is such a thing possible?

For example, if the picture is some buildings side by side, when I hover over the middle building, I would like a rectangle to appear over that building, and a panel to appear with some text information.

If this was a graph, I know could do it using plotly. But it is not a graph, just an image. Can something similar still be done in python or will I have to switch to HTML/CSS/Javascript (which I am not familiar with)?

As a starting point, I have used Pillow/PIL to create the red box at specific sections, but this does not address the interactive component I want.

Any advice for a relative beginner is welcomed.

Yano
  • 27
  • 6
  • 1
    Try this for a starting point: https://www.w3schools.com/html/html_images_imagemap.asp and this https://stackoverflow.com/a/72188129/12571484 – Adam Jan 05 '23 at 10:45

0 Answers0