Message Boards Message Boards

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

Posted 10 years ago

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.

POSTED BY: David Reiss
6 Replies

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!

POSTED BY: David Reiss
Posted 10 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]]
POSTED BY: Alexey Popkov

Hi,

what about

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

enter image description here

Cheers,

M.

POSTED BY: Marco Thiel
Posted 10 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?

POSTED BY: Douglas Kubler

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

POSTED BY: David Reiss

Any thoughts O' denizens of the Community?

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract