package example;

import ev3dev.hardware.display.SystemDisplay;
import ev3dev.utils.JarResource;
import lejos.hardware.lcd.GraphicsLCD;
import lejos.robotics.Color;
import lejos.utility.Delay;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

public class LCDDrawImagesTest {

    public static GraphicsLCD lcd = SystemDisplay.initializeRealLCD();

    public static void main(final String[] args) throws IOException {

        System.out.println("EV3 LCD Example");

        clear();

        JarResource.export("cross.gif");
        JarResource.export("nought.gif");

        BufferedImage img = null;
        Image image = ImageIO.read(new File("nought.gif"));
        try {
            img = ImageIO.read(new File("cross.gif"));
        } catch (IOException e) {

        }

        //lcd.setColor(Color.BLACK);
        lcd.setColor(0,0,0);
        //LCD.drawImage(img, new AffineTransform(1f, 0f, 0f, 1f, 0, 0), null);
        //LCD.drawImage(image, 40,40, null);
        lcd.drawImage(image,40,40,0);
        //LCD.drawImage(img, 0,0, Color.WHITE, null);
        lcd.drawImage(img, 0,0,0);

        lcd.refresh();

        Delay.msDelay(5000);

        JarResource.delete("cross.gif");
        JarResource.delete("nought.gif");

    }


    public static void clear() {
        //lcd.setColor(Color.WHITE);
        lcd.setColor(255, 255, 255);
        lcd.fillRect(0, 0, lcd.getWidth(), lcd.getHeight());


    }

}
@@ -578,83 +578,77 @@
     
-JarResource.export(%22cross.gif%22);%0A        JarResource.export(%22nought
+BufferedImage cross  = ImageIO.read(JarResource.stream(%22cross
 .gif%22)
+)
 ;
-%0A
 %0A   
@@ -670,193 +670,64 @@
 age 
-img = null;%0A        Image image = ImageIO.read(new File(%22nought.gif%22));%0A        try %7B%0A            img = ImageIO.read(new File(%22cross.gif%22));%0A        %7D catch (IOException e) %7B%0A%0A        %7D
+nought = ImageIO.read(JarResource.stream(%22nought.gif%22));
 %0A%0A  
@@ -936,21 +936,21 @@
 awImage(
-image
+cross
 ,40,40,0
@@ -1024,27 +1024,30 @@
 d.drawImage(
-img
+nought
 , 0,0,0);%0A%0A 
@@ -1103,92 +1103,8 @@
 );%0A%0A
-        JarResource.delete(%22cross.gif%22);%0A        JarResource.delete(%22nought.gif%22);%0A%0A
     
@@ -1279,14 +1279,13 @@
 ));%0A
-%0A%0A
     %7D%0A%0A
-
 %7D
+%0A

Use JarResource.stream() in example