What governs images resizing in the FrontEnd environment

What is responsible for the middle Row images' size? And why single image row is different?

{#, Row[{#, #}], Row[{#}]} & @ RandomImage[1, {100, 100}]


I know I can prevent that with mapping with Pane but I would like to have more understanding about what happens.

I thought it is related to some styles but I haven't found anything related in Core.nb under ImageGraphics or RowDefault styles.

There are related options like ImageSizeAction or ImageSizeMultipliers but I've failed to find connection with the case.

It doesn't seem predictable, since here overall size is larger yet nothing is resized:

{#, Row[{#, #, #, #, #}], Row[{#}]} &@RandomImage[1, {50, 100}]


• Related questions for background: (8583), (39996), (72573) – Mr.Wizard Feb 12 '16 at 23:41
• I have looked everywhere I can think of and I found nothing. This may be deeply embedded in the system. – Mr.Wizard Feb 13 '16 at 0:08

There are two distinctions to be made here. Both Row and List will resize graphics objects if they are above a certain threshold size, and that threshold size is different.

List

List will resize a graphics object when its width is larger than 180 pixels, and then further reduce its size if the width is over 360

Manipulate[Labeled[
{RandomImage[1, {n, 200}]},
"Width = " <> IntegerString[n]], {{n, 50}, 50, 1000, 1},
ContentSize -> {300, 400}]


A similar effect is seen with the height with a threshold value of 430 pixels,

Manipulate[Labeled[
{RandomImage[1, {200, n}]},
"Height = " <> IntegerString[n]], {{n, 50}, 50, 1000, 1},
ContentSize -> {300, 400}]


Row

Unlike List, Row will not resize a graphic if it is the only element in the list,

Row[{RandomImage[1, {300, 200}]}]
Row[{RandomImage[1, {500, 200}]}]


But it will resize if there is more than one element in the list,

Manipulate[
Labeled[
Row[{#, , #, , #, , #}] &@RandomImage[1, {n, 200}],
"Width = " <> IntegerString[n]]
, {{n, 50}, 50, 1000, 1}, ContentSize -> {500, 250}]


Things get even more complicated when you combine the two functions, such that you have Row objects inside the List along with other graphics

Manipulate[
Labeled[
{#, Row[{#, , #, , #, , #}]} &@RandomImage[1, {n, 200}],
"Width = " <> IntegerString[n]]
, {{n, 50}, 50, 1000, 1}, ContentSize -> {500, 250}]


So there appears to be some kind of rhyme and reason to it, but it'd take a bit more work like this to exactly nail down when it is doing this and why.

• List[graphics] will resize the graphics if it is larger than a threshold value, but Row[List[graphics]] will not. However, Row[List[graphics,graphics]] will resize the graphics. I don't pretend to understand why these rules are in place, I just poke it in different ways to see how it responds, and it is predictable. – Jason B. Feb 12 '16 at 9:39
• FrontEnd uses the ImageSizeMultipliers option settings to determine the size of the resized image. Wrap the images with Style[..., ImageSizeMultipliers -> {1, 1}] to disable resizing. – Alexey Popkov Feb 12 '16 at 10:42
• Disabling the resizing is easy enough to do - another way is to give an ImageSize option to each Graphics. But I feel like the question here is to figure out the resizing, why and when it happens. – Jason B. Feb 12 '16 at 11:44