Login  Register

Re: Option "Enlarge" does not work when using "Rotate" in a "batch-run" macro

Posted by Albert Rover on Jan 16, 2010; 12:05pm
URL: http://imagej.273.s1.nabble.com/Option-Enlarge-does-not-work-when-using-Rotate-in-a-batch-run-macro-tp3689701p3689704.html

Hi Michael,

I am using ImageJ version 1.43n. This is what Wayne said about this:

== begin quote ==

Dear Albert,

I am able to reproduce this problem, and I should be able to fix it, but
it will probably take me a few days. One work around would be to add

  setBatchMode(true);

to the beginning of the macro and to run it from within ImageJ.

Best regards,

-wayne

== end quote ==

So this is really a bug. It only occurs if you start the macro from the
command line. Maybe you started the macro from inside ImageJ and thats
why it worked for you?


Regards


On 01/15/2010 10:22 AM, Michael Schmid wrote:

> Hi Albert,
>
> as far as I can say it works in ImageJ version 1.43n - maybe you have
> an old version?
>   newImage("test1", "RGB White", 256, 256, 1);
>   run("Rotate... ", "angle=45 grid=0 interpolation=None enlarge");
> It won't enlarge the image if you have a selection different from
> 'Select All'.
>
> Michael
> ________________________________________________________________
>
> On 14 Jan 2010, at 13:46, 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
>>
>>
>> Regards