Saves the specified image in GIF format or as an animated GIF if the image is a stack.
(ImagePlus imp, String path)
| 18 | |
| 19 | /** Saves the specified image in GIF format or as an animated GIF if the image is a stack. */ |
| 20 | public static String save(ImagePlus imp, String path) { |
| 21 | if (imp==null) |
| 22 | imp = IJ.getImage(); |
| 23 | if (path==null || path.length()==0) |
| 24 | path = SaveDialog.getPath(imp, ".gif"); |
| 25 | if (path==null) |
| 26 | return null; |
| 27 | GifWriter gf = new GifWriter(); |
| 28 | //gf.showErrors = false; |
| 29 | gf.run(imp, path); |
| 30 | return gf.error; |
| 31 | } |
| 32 | |
| 33 | public void run(String path) { |
| 34 | ImagePlus imp = IJ.getImage(); |