title: Rounded corners on an image border - image extends beyond the border
body: <p>I'd like to add a border with rounded corners to images in my publication. </p>
  
  <p><a href="https://i.stack.imgur.com/ivgSV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ivgSV.png" alt="enter image description here"></a></p>
  
  <p>That's simple enough using Antennahouse: </p>
  
  <pre><code>&lt;fo:block border="1pt solid black" axf:border-radius="4mm"&gt;
  </code></pre>
  
  <p>But when I place an image inside this block, the image extends to the corners of the rectangle, i.e. the image is visible in the area outside the rounded corners (the black areas in the image above). </p>
  
  <p>Is it possible to hide the image area outside the rounded corners? </p>
  
  <p>I've tried stacking 2 images using z-index: z-index=1 for an image that contains the borders and a transparent center, z-index=0 for the photo. That sort of works, but because I have images of variable sizes I have to resize the border image and I end up with different border thicknesses and radii. </p>