Page 1 of 1

Rotate Image, Problem, Will to Pay!!!

Posted: Fri Jul 08, 2005 9:24 am
by n_wattam
This is my problem, and i am will to pay to have this done now..


I have an image of a map, and i want to place images of arrows on this map to represent the wind direction.

This part i can do so far.

But instead of using many different arrows to represent North East South West, etc, i want to just use one and rotate it.

Now this is where i get the problem, when using the 'roate' command i can do this, however it looses transparany, and i end up with a black box with the arrow in it.

Can anyone help, i need this asap.

Posted: Fri Jul 08, 2005 10:36 am
by onion2k
This should be in Graphics. But anyway..

http://www.ooer.com/rotate/rotate.php

Files:

http://www.ooer.com/rotate/rotate.phps (Source)
http://www.ooer.com/rotate/map.png (The amazing map I drew all on my own)
http://www.ooer.com/rotate/arrow.png (The arrow)

Both PNG files are saved as 24bit with transparency. That's important.

No need to pay anything, the code is taken directly from my PHPhoto project. It's rough coz it's not doing bicubic rotation. If you look in the PHP manual comments on this page: http://uk2.php.net/de/imagerotate you'll find an imageRotateBicubic function that does have bicubic stuff.. I've not included it in my project yet (mainly coz I don't understand it).

Posted: Fri Jul 08, 2005 6:26 pm
by n_wattam
Hi,

Thanks loads for your help.. this is really create..

I've just tryied it my self and it worked excellent, however when i tryied with my arrows and map, the arrows apear a bit bitty?

So you have any idea to this

http://www.kiteforums.net/_test/map.png
http://www.kiteforums.net/_test/arrow.png

above is the files i use...

Posted: Fri Jul 08, 2005 7:47 pm
by n_wattam
hay think i have solves this problem, it seems with working with such a small file like the arrow its more prone to errors.

So what i have done is, changes from a 30px image to a 400px image, then resize the large image back to a 30px, and you cant notices the mistakes..

I'm so made up now, i will just need 3 arrows, 1 each a different colour instead of 16 arrows for each colour...

A little bit of work for me to put all these different functions together, but i'm well happy...

Thank again for your help... :P

Posted: Sat Jul 09, 2005 5:22 am
by onion2k
No problem.