Image Saver --Java Programming: Solving Problems with Software


import edu.duke.*;
import java.io.*;
public class imageSaver {
    public void doSave(){
        DirectoryResource dr = new DirectoryResource();
        for(File f : dr.selectedFiles()){
            ImageResource image = new ImageResource(f);
            String fname = image.getFileName();
            String newfname = "copy-" + fname;
            image.setFileName(newfname);
            image.draw();
            image.save();
        }
    }
   
}

Comments

Popular posts from this blog

Choose Your Social Media Channels Week 5 Quiz