Message Boards Message Boards


Why doesn't an Image resize in a Column or Grid

Posted 7 years ago
6 Replies
3 Total Likes

Consider the following

With[{img = ExampleData[{"TestImage", "Lena"}]}, 
 Column[{ImageResize[img, 400]}, ItemSize -> {30, 30}, Frame -> All]]

The result is this:

enter image description here

Why is the image, by default, this small size within its bounding area? (The same issue is also true for Grid, but seemingly not for GraphicsGrid.)

The actual size of the image is

In[3]:= ImageDimensions[ExampleData[{"TestImage", "Lena"}]]

Out[3]= {512, 512}

I have tried various options settings for Column and Grid but to no avail.

6 Replies

Any thoughts O' denizens of the Community?

No ideas at all? None? Ok, I will have to pester someone directly. ;-)

Posted 7 years ago

If you click on the image and set Magnification to 100%, the image is displayed full size. Puzzle is where can you programmatically set Magnification to 100%? Or why should you have to set it?


what about

With[{img = ExampleData[{"TestImage", "Lena"}]}, Column[{Image[img, ImageSize -> Full]}, ItemSize -> {30, 30}, Frame -> All]]

enter image description here



Posted 7 years ago

Try these two solutions:

With[{img = ExampleData[{"TestImage", "Lena"}]}, 
 Column[{Image[img, ImageSize -> Full]}, ItemSize -> {30, 30}, 
  Frame -> All]]

With[{img = ExampleData[{"TestImage", "Lena"}]}, 
 Column[{img}, ItemSize -> {30, 30}, Frame -> All, 
  BaseStyle -> ImageSizeMultipliers -> 1]]

Thank you gentlemen. These are certainly workarounds. I consider this either a bug though or a design flaw, or a design decision that I do not understand the reasoning for...

It doesn't make sense to me that placing an image in a Column or grid with sufficient ItemSize to show the full Image should not show the full image when not using a Grid or Column ceratinly does show the full size as in

With[{img = ExampleData[{"TestImage", "Lena"}]}, ImageResize[img, 400]]

I will send this query off to the bugs folks to parse as they see fit...

Thanks again!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract