Skip to content

Commit

Permalink
Revert "New file"
Browse files Browse the repository at this point in the history
This reverts commit a64074a.
  • Loading branch information
bertrandopiroscafo committed Oct 6, 2023
1 parent a64074a commit 94fbc8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 30 deletions.
2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

διαφθορά (corruption en grec) est un outil pour le Glitch Art.

διαφθορά (corruption in Greek) is a tool for Glitch Art.
διαφθορά (corruption in greek) is a tool for Glitch Art.

![Diaphtora](MEDIA/diaphtora_demo.png)
29 changes: 2 additions & 27 deletions diaphtora.pde
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ SOFTWARE.
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
import controlP5.*;
import themidibus.*;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;

String _fno = "./TEMP/corrupted_output.jpg";
String _fn = "m33_p128.jpg";
Expand Down Expand Up @@ -255,12 +252,8 @@ void processImage() {
}
try
{
//long t = System.nanoTime();
saveBytes(_fno, _b);
_img = loadImage(_fno);
//_img = bufferedImageToPImage(byteArrayToBufferedImage(_b)); // slower than with disk access !!!
//t = System.nanoTime() - t;
//println("Elapsed time (milliseconds) " + t / 1000000);
_img = loadImage(_fno);

if (_isFX == true)
{
Expand All @@ -276,7 +269,7 @@ void processImage() {
//image(_img, 0,0, 810, 710);
}
catch (Exception e){
//System.out.println("JPEG READER CRASHED !!");
System.out.println("JPEG READER CRASHED !!");
}
}

Expand Down Expand Up @@ -324,24 +317,6 @@ void alternate(int i)
}
}

BufferedImage byteArrayToBufferedImage(byte[] data)
{
InputStream in = new ByteArrayInputStream(data);
try {
BufferedImage wrackedImage = ImageIO.read(in);
return wrackedImage;
} catch (IOException e) {
//e.printStackTrace();
}

return null;
}

PImage bufferedImageToPImage(BufferedImage bufferedImage)
{
return new PImage(bufferedImage);
}

// ===================================================
// MMI
// ===================================================
Expand Down

0 comments on commit 94fbc8b

Please sign in to comment.