3
$\begingroup$

Below is a screenshot of mathematica help :

enter image description here

As you see, if I click the image, orange colored frame appears, and we can control its size.

Can we make it impossible to resize an image ?

Probably by setting some option for the image, for example, ImageSizeControl->Disable.

Of course we should be able to copy/paste the image like other common images, but it should keep the original size after pasting.

I am concerned with precise arrangement of letters and images. In some process, kindness of the mathematica (automatic resizing, resize frame,...) makes it harder.

$\endgroup$
5
  • 2
    $\begingroup$ It's just a display thing. You're not resizing the actual data. If you drag the corner far enough, you'll start seeing each pixel as a large square. $\endgroup$
    – lericr
    Commented Jul 10, 2022 at 19:00
  • 4
    $\begingroup$ Try Deploy @ .... $\endgroup$
    – Kuba
    Commented Jul 10, 2022 at 19:01
  • 2
    $\begingroup$ I do Image[image, Magnification -> 3/4] to display images with the correct pixel size, but I'm not sure if its OS or hardware dependent $\endgroup$
    – Coolwater
    Commented Jul 10, 2022 at 19:04
  • $\begingroup$ @Coolwater Have you seem this? :) $\endgroup$
    – Silvia
    Commented Jul 11, 2022 at 8:23
  • $\begingroup$ @ Kuba ♦, What a hidden command Thank you! $\endgroup$
    – imida k
    Commented Jul 11, 2022 at 13:14

2 Answers 2

2
$\begingroup$

The automatic resizing behavior you wish to disable is controlled by the option ImageSizeMultipliers. According to the Documentaion page for ImageSizeMultipliers (under the "Properties & Relations" section):

An explicit value of ImageSize always overrides a multiplier

Hence you just need to specify an explicit ImageSize for Image:

Image[#, ImageSize -> ImageDimensions@#] &@Import["ExampleData/rose.gif"]
{%}

screenshot

$\endgroup$
2
  • $\begingroup$ Thank you, but the images are still resizable. $\endgroup$
    – imida k
    Commented Jul 11, 2022 at 13:23
  • $\begingroup$ Yes... some minutes ago I posted an answer using Deploy. $\endgroup$
    – imida k
    Commented Jul 11, 2022 at 13:34
1
$\begingroup$

According to Kuba♦'s comment :

Below video shows all.
Left mouse click to deployed image has no effect in any sense.
Right mouse click to deployed image shows popup but without resizing frame.

enter image description here

P.S. To copy deployed image, you should drag the whole region of the image and (it seems easy to drag from right to left direction) right click, then choose copy in the popup. Just right clicking to the image does not show active(=not grayed out) copy menu. The copyed+pasted image is also deployed. It is unfortunate that copying deployed image is not very easy. See below video.

enter image description here

$\endgroup$
4
  • 2
    $\begingroup$ Deploy prevents manual resizing by the mouse, but not automatic resizing inside of List-like constructs, which is controlled by ImageSizeMultipliers. $\endgroup$ Commented Jul 11, 2022 at 13:34
  • $\begingroup$ Thank you. Is there an easy way to copy deployed image ? $\endgroup$
    – imida k
    Commented Jul 11, 2022 at 13:43
  • 1
    $\begingroup$ Probably not, because Deploy makes its contents non-selectable by mouse click. You can use the arrow keys on your keyboard with the Shift key pressed to select such an object for sure. $\endgroup$ Commented Jul 11, 2022 at 13:51
  • $\begingroup$ Thank you! Shift + arrow $\endgroup$
    – imida k
    Commented Jul 11, 2022 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.