Re: Converting Images

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Converting-Images-tp5003335p5003343.html

Hi Tim,

use the macro recorder, Plugins>Macros>Record, and perform the steps manually:
- Open the tiff image
- Adjust brightness&contrast as you like (if required, maybe use the 'Auto' button of the B&C panel)
- Save as Jpeg

For running ImageJ with that macro from the command line, see
  http://rsb.info.nih.gov/ij/docs/guide/146-18.html#toc-Section-18

If you pass the filename from the commandline, you have to use getArgument() in the macro:

e.g.
  > ImageJ -macro myConvertMacro.ijm /DiskE/data/myImage.tif
and in the macro
  open(getArgument());

Michael
________________________________________________________________
On Jun 11, 2013, at 15:46, tim123 wrote:

> Hi,
>
> I am working in excel and trying to import a 16 bitt Tiff image into excel.
> I have not been able to do this so I am trying to write a macro that
> converts an image to a jpeg in ImageJ from the command line but I am having
> a lot of difficulty. I was just going to say the picture in the same folder
> as a JPEG and then import that picture. Thanks for any advice!

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