forked from RepoMirrors/kami-blue
add temp method
This commit is contained in:
parent
04ec2f8475
commit
537b2c10d3
|
@ -1,12 +1,15 @@
|
||||||
package me.zeroeightsix.kami.util;
|
package me.zeroeightsix.kami.util;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.awt.image.DataBufferByte;
|
import java.awt.image.DataBufferByte;
|
||||||
|
import java.awt.image.WritableRaster;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.lwjgl.BufferUtils.*;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,5 +31,18 @@ public class WindowIcon {
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
/*
|
||||||
|
public static ByteBuffer[] extractBytes() throws IOException {
|
||||||
|
BufferedImage bufferedImage = ImageIO.read(new File("kami.jpg"));
|
||||||
|
|
||||||
|
// ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||||
|
// ImageIO.write(bufferedImage, "jpg", bos );
|
||||||
|
// byte [] data = bos.toByteArray();
|
||||||
|
|
||||||
|
WritableRaster raster = bufferedImage.getRaster();
|
||||||
|
DataBufferByte data = (DataBufferByte) raster.getDataBuffer();
|
||||||
|
|
||||||
|
return new ByteBuffer[]{ByteBuffer.wrap(data.getData())};
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
Loading…
Reference in New Issue