Advertisement
Marin126

MainImagen

Apr 16th, 2020
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1.  
  2. import java.io.File;
  3. import java.io.FileWriter;
  4. import java.util.Scanner;
  5.  
  6. /*
  7. * To change this license header, choose License Headers in Project Properties.
  8. * To change this template file, choose Tools | Templates
  9. * and open the template in the editor.
  10. */
  11. /**
  12. *
  13. * @author anton
  14. */
  15. public class Principal {
  16.  
  17. public static void main(String[] args) {
  18. String nombreFicheroEntrada = (args[0]);
  19. String nombreFicheroSalida = (args[1]);
  20. ImagenPGM imagen = new ImagenPGM(nombreFicheroEntrada);
  21.  
  22. try {
  23. imagen.leeFichero(nombreFicheroEntrada, nombreFicheroSalida);
  24.  
  25. } catch (Exception e) {
  26. System.out.println("Error al abrir el fichero: " + e.toString());
  27. e.printStackTrace();
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement