Re: Option "Enlarge" does not work when using "Rotate" in a "batch-run" macro
Posted by
Rasband, Wayne (NIH/NIMH) [E] on
Jan 18, 2010; 3:14am
URL: http://imagej.273.s1.nabble.com/Option-Enlarge-does-not-work-when-using-Rotate-in-a-batch-run-macro-tp3689701p3689702.html
On Jan 14, 2010, at 7:46 AM, Albert Rover wrote:
> Hi,
>
> Option "Enlarge Image to Fit Result" does not work when using
> the "Rotate function" in a macro that is run in batch mode. The
> option is simply ignored. Running the macro without the "-batch"
> option works as expected.
>
> Is this a bug or maybe a "design limitation"? Does anybody
> know a fix/workaround?
>
> Steps to reproduce:
>
> 1. Create the macro text.txt:
>
> image="/tmp/test.jpg"
> open(image);
> run("Rotate... ", "45 grid=0 interpolation=None enlarge");
> save(image);
> close();
>
> 2. Run:
>
> $ java -jar ./ij.jar -macro /tmp/test.txt -batch
The 1.43o daily build fixes a bug that caused commands implemented using macros to fail if the "ImageJ" window was not open, which is the case when using the "-batch" option to run a macro from the command line. The Rotate command used in this "-batch" macro failed because it uses the Edit>Selection>Rotate command, which is implemented using the macro at
http://rsbweb.nih.gov/ij/source/macros/RotateSelection.txt-wayne