> On Aug 31, 2024, at 12:39 AM, Fred Damen <[email protected]> wrote:
> Greetings,
> 
> If you run
> run("Size...", "height=256 depth=1 constrain average interpolation=None");
> from a macro the image will resize to what was previously resized using
> the GUI Image/Adjust/Size... and not what was specified in the macro
> command.

Thanks to Michael Schmid, this bug is fixed in the latest ImageJ daily build 
(1.54k16). 

>  I assume this would be the parameters if the height is to be set
> and the aspect ratio of the image being resize is maintained.
> 
> newImage("Untitled", "32-bit noise", 128, 128, 1);
> Image/Adjust/Size...  Height->1024
> newImage("Untitled", "32-bit noise", 128, 128, 1);
> run("Size...", "height=256 depth=1 constrain average interpolation=None");
> 
> Bonus question:
> Is there an macro equivalent of setting ImagePlus.changes to false? Or a
> way of closing an image without the save/dont save popup?

Use
  setOption(“Changes”,false);

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Reply via email to