Skip to content

Instantly share code, notes, and snippets.

@AnimaWish
Created January 30, 2014 10:16
Show Gist options
  • Save AnimaWish/8705785 to your computer and use it in GitHub Desktop.
Save AnimaWish/8705785 to your computer and use it in GitHub Desktop.
/*
int[][] newImage = [-135474, -332854, -1582921, -464440, -398647, -596026, -3117, -333369, -1846352],
[-201267, -1253955, -2504022, -1648970, -1780559, -1648973, -1057092, -596285, -1386057],
[-202297, -1583694, -1978708, -1123399, -1123399, -1517901, -1254987, -1649489, -2373725],
[-465213, -1649487, -1452108, -860742, -729156, -1189451, -531521, -1452623, -2242139],
[-927049, -1387344, -861256, -992587, -927050, -1518931, -532805, -1124686, -1519700],
[-1189965, -1189965, -663878, -663878, -795464, -1255759, -598598, -1124686, -1914458],
[-860742, -1189451, -1123914, -1979223, -532291, -466499, -663878, -1321552, -2505826],
[-794436, -1254987, -1320524, -1978710, -1057608, -531521, -1781589, -1715540, -2505056],
[-135987, -1122882, -1386054, -1254468, -1386057, -925506, -728127, -267576, -1780559],
[-3888, -398647, -990783, -1122369, -464440, -332856, -135477, -3120, -1319751]
*/
BufferedImage newBufferedImage = new BufferedImage(newImage[0].length, newImage.length, BufferedImage.TYPE_INT_ARGB);
for(int row = 0; row<newImage.length; row++) {
for(int col = 0; col<newImage[0].length; col++) {
newBufferedImage.setRGB(col,row,newImage[row][col]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment