Warning: session_start(): open(/var/lib/php/sessions/sess_1ko8sfhpjq99q36ch3sgdsplvi, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
//Please copy this and then fix some stuff then turn it into Javax. I don't know Java very well but you do.
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class ASCIIArt {
public static void main(String[] args) throws IOException {
BufferedImage image = null;
try {
URL url = new URL(); // Ask for image
image = ImageIO.read(url);
} catch (IOException e) {
e.printStackTrace();
}
Graphics g = image.getGraphics();
g.setFont(new Font("SansSerif", Font.BOLD, 24));
Graphics2D graphics = (Graphics2D) g;
graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
graphics.drawString("JAVA", 10, 20);
for (int y = 0; y < height; y++) {
StringBuilder sb = new StringBuilder();
for (int x = 0; x < width; x++) {
sb.append(image.getRGB(x, y) == -16777216 ? " " : "$");
}
if (sb.toString().trim().isEmpty()) {
continue;
}
System.out.println(sb); //Print image out
}
}
}