So just because you are north american you think you have the best language?
Show some respect, I'm just helping the comunity by giving them this tool for free.
I'm not 'North American' (there are a few million North American Canadians speaking French you know). Contrary to popular belief, I'm Dutch - I guess I'm rather multi-cultured because there are so few of us.
I don't understand Spanish, like you don't understand Dutch. That's why everybody here communicates in English. In technical terms, it's a protocol.
First, I'd like to remind you that this 'shared code' board is for shared sourcecode, posted on the forum - and second, what's up with the short fuse? It's so easy to rename a directory to an English name, for an audience that agreed to use English as their means of communication, that I don't know why you'd get insulted by a mere suggestion.
I'd hate you to think I was out to
disrespect diss you, so I hope this cleared it up a bit.
Why don't you make the same program and change the name of the folder to whatever you want?
Okay.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| BufferedImage orig = ImageIO.readFile(new File(...)); int w2 = ceilToPOT(orig.getWidth()); int h2 = ceilToPOT(orig.getHeight()); BufferedImage full = new BufferedImage(w2, h2, BufferedImage.TYPE_RGBA_INT); full.getGraphics().drawImage(orig, 0, 0, null); ImageIO.writeFile(full, "PNG", new File(...));
int ceilToPOT(int v) { for(int pot=1;; pot<<=1) { if(v <= pot) { return pot; } } } |