@@ -0,0 +1,1589 @@
+package com.company;%0A%0Aimport javax.imageio.ImageIO;%0Aimport java.awt.image.BufferedImage;%0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.nio.ByteBuffer;%0A%0Apublic class Main %7B%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        BufferedImage img = null;%0A        try %7B%0A            img = ImageIO.read(new File(%22C:%5C%5CUsers%5C%5Ccallum%5C%5CDesktop%5C%5Cspace_xd.png%22));%0A        %7D catch (IOException e) %7B%0A        %7D%0A%0A        int w = img.getWidth();%0A        int h = img.getHeight();%0A%0A        byte%5B%5D fileBuff = new byte%5B8+(3*w*h)%5D;%0A%0A        byte%5B%5D width = new byte%5B4%5D;%0A        byte%5B%5D height = new byte%5B4%5D;%0A        width =  ByteBuffer.allocate(4).putInt(w).array();%0A        height =  ByteBuffer.allocate(4).putInt(h).array();%0A%0A        fileBuff%5B0%5D = width%5B0%5D; fileBuff%5B1%5D = width%5B1%5D; fileBuff%5B2%5D = width%5B2%5D; fileBuff%5B3%5D = width%5B3%5D;%0A        fileBuff%5B4%5D = height%5B0%5D; fileBuff%5B5%5D = height%5B1%5D; fileBuff%5B6%5D = height%5B2%5D; fileBuff%5B7%5D = height%5B3%5D;%0A%0A        for (int x = 0; x %3C w; x++)%7B%0A            for (int y = 0; y %3C h; y++)%7B%0A                int pitch =  w * (1 * 3);%0A                int pos = (y * pitch) + (x * 1 * 3);%0A                int rgb = img.getRGB(x,y);%0A                fileBuff%5B8+pos+2%5D = (byte) ((rgb & 0x00ff0000) %3E%3E 16);%0A                fileBuff%5B8+pos+1%5D = (byte) ((rgb & 0x0000ff00) %3E%3E 8);%0A                fileBuff%5B8+pos+0%5D = (byte) (rgb & 0x000000ff);%0A            %7D%0A        %7D%0A        FileOutputStream fos = new FileOutputStream(%22C:%5C%5CUsers%5C%5Ccallum%5C%5CDesktop%5C%5Cspace_xd.3ds_Image%22);%0A        fos.write(fileBuff);%0A        fos.close();%0A    %7D%0A%7D%0A

Create imgto3ds_Image.java