18 lines
333 B
Java
18 lines
333 B
Java
package com.danitheskunk.skunkworks;
|
|
|
|
import org.lwjgl.stb.STBImage;
|
|
|
|
import java.nio.ByteBuffer;
|
|
|
|
public class Image {
|
|
ByteBuffer data;
|
|
int width, height;
|
|
Image(ByteBuffer buffer) {
|
|
//todo: resorce system
|
|
int[] x = {0}, y = {0}, n = {0};
|
|
data = STBImage.stbi_load(buffer, x, y, n, 4);
|
|
width = x[0];
|
|
height = y[0];
|
|
}
|
|
}
|