Grid cuts my images

Bug introduced in V9.0 or earlier and persisting through V11.2

pic2 = ImageResize[
ImageCrop@Rasterize@Graphics@Disk[],
{Automatic, 40}]


Grid[{{pic2}}]


This is just annoying...

Win 10 V10.3.1

Q: so, is there any quick fix? Have I missed something obvious?

p.s. e.g. Row works well but it is not Grid :-)

A support case with the identification [CASE:3522370] was created:

Thank you for contacting Wolfram Technical Support.

I have filed a report regarding the behavior you describe. The appropriate development team will be able to review the issue and hopefully implement a fix in a future version.

Fortunately this is not an issue with the object itself, but with its visual representation in the Mathematica front end. Although not a practical workaround, if you increase your magnification from 100% to 200%, you will notice the problem no longer persists. Similarly, if I printed the notebook demonstrating the issue I did not experience the clipping.

If you are able to get away without using ImageCrop, the issue does not seem to present itself. Without seeing your actual application it is difficult to provide a solution that will work in any scenario and still maintain the exact results you desire.

• Grid[{{pic2}}, Frame -> All] clips the left side too. However, this can be repaired with Spacings. Unfortunately, Spacings does not repair the original problem; e.g., Grid[{{pic2}}, Frame -> All, Spacings -> {1, 1}] – bbgodfrey Jan 28 '16 at 12:10
• @bbgodfrey this is just ridiculous :-/ – Kuba Jan 28 '16 at 12:11
• @Hubble07 let's go further and turn off the screen :p – Kuba Jan 28 '16 at 12:13
• Removing ImageCrop works correctly... Strangely magnifying bigger than 1 also corrects it... – s.s.o Jan 28 '16 at 12:18
• I'mu using version 10.3.0 Linux, and this does not happen, Grid shows the circle correctly with or without the Frame option – Jason B. Feb 2 '16 at 8:00

With Frame -> All, the automatic Spacings are weird. The automatic BaselinePosition is bad either way.

It seems to be a good idea to include substitutes for as many of those options which are Automatic by default as possible:

pic2 = ImageResize[ImageCrop@Rasterize@Graphics@Disk[], {Automatic, 40}];

Grid[{{pic2}}, Alignment -> {Center, Center}, Spacings -> {0, 0},
BaselinePosition -> Center, Frame -> All]


• When you put another Grid on that, the feature is back. It would be so nice to not have to care where the inner grid ends up. – Kuba Jan 28 '16 at 12:30
• Grid@List@List@% – Kuba Jan 28 '16 at 12:30
• Grid is terrible. I used this solution but then some glitches were introduced in the interior of the image, unfortunately, I can't share that image and I wasn't able to reproduce that problem with Graphics. That's crazy. – Kuba Jan 29 '16 at 9:29
• @Kuba Don't I know it. :-p – Mr.Wizard Jan 29 '16 at 21:44
• Due to all those issues I'm using in my UI ImagePad[pic2, 1, 1]` or whichever value that fits the background. If such row is cut it's not a harm. – Kuba Feb 2 '16 at 7:43