title: JavaFX: maximum ImageView size
body: <p>This may sound like a duplicate of <a href="https://stackoverflow.com/questions/21501090/set-maximum-size-for-javafx-imageview">Set maximum size for JavaFX ImageView</a> but it's different.</p>
  
  <p>I'd like to restrict the maximum size of an ImageView. Unfortunately, the only way to set the ImageView's size seems to be fitWidth and fitHeight which however enlarges the image if it's smaller than the fit values.</p>
  
  <p>I tried setting fitWidth/fitHeight to 0/0 and wrap the ImageView into a pane with maxWidth set - no success (image is displayed in original size).</p>
  
  <p>To me it seems as this is not achievable by JavaFX, however I can't believe it. But I couldn't find anything online. Are there any tricks/bugs/workarounds on this?</p>