SaveAs command line call

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SaveAs command line call

Jaykris

Hello,

Can someone please help me with the command line call for Save As in ImageJ? I want to save a tiff image as a jpeg image? I want to do this without using GUI.

Thanks in advance!!

Kind Regards,
Jay
Reply | Threaded
Open this post in threaded view
|

Re: SaveAs command line call

Rocco D'Antuono
Hi Jaykris, you can use this line:
...
saveAs("Jpeg", path+"Image name.jpg");
...
Wher you have to substitute the variable "path" with correct value.
You can also get this value (if window of your image is selected) using  following line:
...
path=getDirectory("image");
...
So the final code will be:
...
path=getDirectory("image");
saveAs("Jpeg", path+"Image name.jpg");
...

Greetings,
Rocco


Senior Microscopist
Crick Advanced Light Microscopy facility (CALM)
The Francis Crick Institute
1 Midland Road, NW1 1AT, London (UK)
https://roccodant.github.io/
Reply | Threaded
Open this post in threaded view
|

Re: SaveAs command line call

Jaykris

Thanks Rocco!!

Very helpful.

Cheers,
Jay