public static TextureDataHolder incSize(TextureDataHolder tex, int newWidth) { int n = newWidth / tex.width; TextureDataHolder newTex = new TextureDataHolder(newWidth, tex.height * n); for (int i = 0; i < newTex.data.length; i++) { newTex.data[i] = 0x98769876; } for (int x = 0; x < tex.width; x++) { for (int y = 0; y < tex.height; y++) { int col = tex.data[x + y * tex.width]; for (int dx = 0; dx < n; dx++) { for (int dy = 0; dy < n; dy++) { newTex.data[(x * n + dx) + (y * n + dy) * newTex.width] = col; } } } } return newTex; }