Power of 2 Converter

Hi Im new to the site but I want to help as much as I can.

I know this is the “Shared code” section but I didn’t know where to put it.

Well, here it is: http://www.java-gaming.org/user-generated-content/members/238563/power-of-2-converter.jar

It is power of 2 conveter that I made. A lot of people (including myself) are having problems loading textures in LibGDX
because their graphics card doesn’t support OpenGL 2.0 and the images most have a power of 2 resolution.

The images go to a folder on your desktop called “Power of 2”. The program works very simple. It just adds translucent space at the right and bottom side of the image.

And the last thing you have to know is that the images most be in “PNG” format, otherwise it won’t work.

That’s it… Enjoy ;D

This board is for sharing sourcecode. You should post the code of the method that does most of the work.

There is no reason to use filenames in your native language. Just consider how you’d feel about using a tool that would create a directory called “tot de tweede macht”.

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.

Why don’t you make the same program and change the name of the folder to whatever you want?

Don’t put words in his mouth.

This is a nativity English speaking forum - all he was saying is that when an application starts creating unidentifiable documents with foreign uninterpreted names, it makes them uneasy.

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.

Okay.


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) { // safe for image dimension inputs
   for(int pot=1;; pot<<=1) {
      if(v <= pot) {
         return pot;
      }
   }
}

Disrespect is not a verb. Sorry have to say it.

You should likely be using texture packing rather than a texture per image.

Alright I want to apologize to you and anyone who read my rude post. I admit totally overreacted.

In fact, for the sake of the comunity and to make peace with you, I will change the language of the program.

And about the fact that this is the sourcecode section, can somebody tell me where can I move it to?

Any noun can be verbed, and every verb has a nouning.

But it isn’t always the same word:

“The force is strong with this one” “This one has much strength in the force”

“The husband hates his wife” “The wife feels a great hatred toward her husband”

Although in this case I think you are right.

Sorry again but I’m British and I love to talk about my language.

To disrespect (verb) someone is to show disrespect (noun), which would make you disrespectful (adjective).

Can someone go disrespect for me? No? This is something that has change here in the states. They have now made it a verb when it never was. I am normally not a big grammar guy or one to argue with usage cases but for this one specific case I simply can’t let it go. You can’t disrespect someone. You can show disrespect to someone. Anyways, sorry to derail. I will shut up now.

hHQ2756cyD8

Can someone go destroy for me? :point: Same sentence. Different verb.
Doesn’t mean destroy isn’t a verb.

Both destroy and disrepect need a noun to make the sentence complete.

Can someone go disrespect/destroy [noun] for me? Yes.

Someone respects someone else.
Anna respects Bob.

That is obviously correct. Now, yes, the whole disrespect stuff came from hiphop I guess. Still if to respect sth/so is a verb, disrespect should be one too.

I do not respect that.
I (!respect) that
I disrespect that.

Just like “I disallow something.”

Ahh I guess it is just a cultural thing. You are right. Still sounds wrong. I learned more traditional English I suppose or older. For an example, the Oxford comma. Bill, Tedd, and Jeffery or Tom, Franky and Margaret? ;D

But unfortunately not the Oxford an! ;D

This programming thread became a language thread ;D