(String path)
| 44 | ImagePlus imp; |
| 45 | |
| 46 | public void run(String path) { |
| 47 | IJ.showProgress(0); |
| 48 | imp = WindowManager.getCurrentImage(); |
| 49 | if (imp==null) |
| 50 | {IJ.noImage(); return;} |
| 51 | try { |
| 52 | writeImage(imp, path); |
| 53 | } catch (Exception e) { |
| 54 | String msg = e.getMessage(); |
| 55 | if (msg==null || msg.equals("")) |
| 56 | msg = ""+e; |
| 57 | IJ.error("BMP Writer", "An error occured writing the file.\n \n" + msg); |
| 58 | } |
| 59 | IJ.showProgress(1); |
| 60 | IJ.showStatus(""); |
| 61 | } |
| 62 | |
| 63 | void writeImage(ImagePlus imp, String path) throws Exception { |
| 64 | if(imp.getBitDepth()==24) |
nothing calls this directly
no test coverage detected