On Oct 12, 2010, at 9:31 PM, 孟军 wrote:
> HI all,
>
>
> I wanna rotate many images in one folder by 180 degree.
> I used the process>>batch>>macro function.
>
> I added macro code from plugins>>macros>>recode, as follows:
>
> imp = IJ.openImage("XXXXXX");
> IJ.run(imp, "Rotate... ", "angle=180 grid=1 interpolation=None");
>
> However, it did not work and an error emerged like this:
>
> Unrecognized IJ function name in line 1
> i=0;imp=IJ.<openimage>("XXXXXX");
>
> I'm a novice to IJ, so any help would be appreciated.
The only macro code needed to rotate all the images in a folder by 180 degrees is
run("Rotate... ", "angle=180 interpolation=None");
The Process>Batch>Macro command will automatically open and save the images. The command recorder (Plugins>Macros>Record) must be in "Macro" recording mode (not "JavaScript" or "Plugin") to generate code for use with the Process>Batch>Macro command.
-wayne
>
> Best Regards,
>
> Jun