Designer Error: Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint

Hey,

I have a custom Perspective component and after adding thumbnail images to my palette entries, I'm getting the following error in the designer:

Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint

The thumbnails load and look correct, but the logs are very noisy :man_shrugging:.

Here's how I'm reading my images:

ImageIO.read(Components::class.java.getResource(path))

Any advice?

Something is drawing into these images after you read them. Figure out what that is.

It actually wasn't the thumbnail that was causing the errors, it was the InteractiveSvgIcon.
After much trial and error, removing the opacity tags from my SVGs made the problem go away :man_shrugging:.

This SVG causes errors:

<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g fill="#445c6d" stroke="none">
<path d="M13.439 8.046c-1.864 0.037 -1.476 1.217 -2.789 1.515 -1.334 0.303 -1.545 -3.259 -2.879 -3.259 -1.334 0 -1.63 3.461 -3.301 5.836l-0.048 0.067 3.582 2.068 5.435 -3.138z" fill-opacity=".361"></path>
<path d="M13.439 7.939c-0.624 -0.801 -1.047 -1.722 -1.958 -1.722 -1.611 0 -1.187 2.629 -2.968 2.629 -1.781 0 -1.968 -2.828 -3.986 -0.17 -0.643 0.847 -1.16 1.791 -1.567 2.685L8.004 14.273l5.435 -3.138z" fill-opacity=".361"></path>
<path d="M2.569 9.027c0.611 -1.693 0.875 -3.065 2.043 -3.065 1.781 0 2.205 5.003 3.732 4.494 1.526 -0.509 1.357 -3.222 3.732 -3.222 0.452 0 0.913 0.277 1.364 0.725v3.176l-5.435 3.138 -5.435 -3.138V9.027z" fill-opacity=".361" opacity=".8"></path>
<path d="m8 14.667 -5.774 -3.333V4.667L8 1.333l5.774 3.333v6.667zm-5.096 -3.725L8 13.883l5.096 -2.942V5.058L8 2.117 2.904 5.058z"></path>
</g>
</svg>

While this one does not:

<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g fill="#445c6d" stroke="none">
<path d="M13.439 8.046c-1.864 0.037 -1.476 1.217 -2.789 1.515 -1.334 0.303 -1.545 -3.259 -2.879 -3.259 -1.334 0 -1.63 3.461 -3.301 5.836l-0.048 0.067 3.582 2.068 5.435 -3.138z" fill-opacity=".361"></path>
<path d="M13.439 7.939c-0.624 -0.801 -1.047 -1.722 -1.958 -1.722 -1.611 0 -1.187 2.629 -2.968 2.629 -1.781 0 -1.968 -2.828 -3.986 -0.17 -0.643 0.847 -1.16 1.791 -1.567 2.685L8.004 14.273l5.435 -3.138z" fill-opacity=".361"></path>
<path d="M2.569 9.027c0.611 -1.693 0.875 -3.065 2.043 -3.065 1.781 0 2.205 5.003 3.732 4.494 1.526 -0.509 1.357 -3.222 3.732 -3.222 0.452 0 0.913 0.277 1.364 0.725v3.176l-5.435 3.138 -5.435 -3.138V9.027z" fill-opacity=".361"></path>
<path d="m8 14.667 -5.774 -3.333V4.667L8 1.333l5.774 3.333v6.667zm-5.096 -3.725L8 13.883l5.096 -2.942V5.058L8 2.117 2.904 5.058z"></path>
</g>
</svg>
3 Likes