Page 1 of 2

PNG sprite rotator/scaler util v.1.03

PostPosted: Mon Nov 22, 2010 11:32 pm
by DST
Greetings. I have made a Java util that allows you to rotate/scale sprites with full alpha (transparency) support.

I used it to create the bullet demo for Chai. viewtopic.php?f=4&t=9396

This is especially useful for particle fx, objects with trails, etc. etc.

This util formats rotations to fit the GE angle system.

It is a java util and requires java to run. Compatibility has been tested with 64 win7 and 64 ubuntu.

Hope you find this useful!

**Update v1.01: Fixed bug on non-square frame amounts.**
**Update v1.02: Fixed float bug on rotation amounts**
**Update v1.03: Fixed Multiple bugs:
Properly determines absolute filled sheets(no blank spots), and chooses closest combination to square that's possible. This means any frame number works - if you choose a prime number, your sheet will be 1xnumber, a square number will result in a sheet sqrt(number) x sqrt(number).
Zoom properly capped.
You can now drag the image with Right Mouse button.


snapx.jpg

snapx.jpg

DSTSpriteRotatorWindows1.03.zip
(263.71 KiB) Downloaded 275 times

Re: PNG sprite rotator/scaler util v.1.0

PostPosted: Tue Nov 23, 2010 2:18 am
by Chai
This is awesomeeeee.
It's so much faster than my way.

Thank you very much for your contribution.

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Tue Nov 23, 2010 8:00 pm
by schnellboot
What do I have to write in nFrames?

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Tue Nov 23, 2010 8:19 pm
by schnellboot
2 little things:
1.Could you extend the FileName text field with a "Open .." button?
2.My mousewheel is broken, is there another way to zoom-out?

This tool rocks +1

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Thu Nov 25, 2010 1:07 am
by BloodRedDragon
the filename wont work :( do you just put the name in or the full location?

Also, HYPNOTOAD!!!!! :P

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Thu Nov 25, 2010 3:24 am
by DST
1. the file must be in the same directory with the exe file.
2. Just type the filename without the extension i. e. to load test.png you would just enter test

3. Yes i do plan to add a file dialog. Also, you should get a new mouse.

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Thu Nov 25, 2010 8:41 pm
by lcl
Wow this seems so cool! :D
Only one bad thing... I think I don't have java 'cause I can't run it. :P

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Fri Nov 26, 2010 2:51 am
by BloodRedDragon
lcl wrote:Wow this seems so cool! :D
Only one bad thing... I think I don't have java 'cause I can't run it. :P

(insert slapstick trumpet of pity) :P

Ah, you have to load the file from the same location as the .exe now do you? i could've guessed. Cheers.

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Fri Nov 26, 2010 5:10 am
by jimmynewguy
maaaaan i really need this and it looks awesome...I have java but when i run it i get an error message: "Could not find the main class: Program will exit!" :(

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Fri Nov 26, 2010 11:33 pm
by Game A Gogo
works like a charm, great program here!

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Tue Dec 07, 2010 1:14 pm
by BloodRedDragon
DST, I am going to use this for some animations in my game. Do you want credit and point whenever I produce a Game onto here (or outside of GE possibly) where one of the animations is created using this? :o

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Thu Dec 09, 2010 1:20 pm
by DST
Glad you found it useful, but no, i don't need any credit for it. It's a simple utility that anyone could have made, really. I have some more i plan to tidy up and post in the future.

Re: PNG sprite rotator/scaler util v.1.03

PostPosted: Sat Feb 05, 2011 1:13 pm
by DST
Updated yet again, fixing most remaining problems. It will now always output completely filled sheets, and you can drag the image to see other areas of it.

Re: PNG sprite rotator/scaler util v.1.03

PostPosted: Sat Feb 05, 2011 2:29 pm
by schnellboot
nice

Re: PNG sprite rotator/scaler util v.1.1

PostPosted: Fri Feb 18, 2011 2:55 pm
by speckford123
lcl wrote:Wow this seems so cool! :D
Only one bad thing... I think I don't have java 'cause I can't run it. :P


You can always use what I've been using for the longest time,
Feral's sprite rotator. It's not java so it should work for you. :D