views:

743

answers:

4

I'm trying to rotate a png that's based off a value in my database (1-360 degrees)

however, I'm using it in conjunction with the google mapping api and if I use "header('Content-type: image/png');" my map does not show and only the image.

Any ideas?

+1  A: 

There is a jQuery plug-in for rotating imaages with javascript.

kgiannakakis
+1  A: 

From the ImageMagic API site:

PHP
MagickWand for PHP a native PHP-extension to the ImageMagick MagickWand API.
IMagick is a native PHP extension to create and modify images using the ImageMagick API. Documentation for the extension is available here.
phMagick is a wrapper class for ImageMagick, wrapping the most common web image manipulation actions in easy to use functions, but allowing full access to ImageMagick's power by issuing system calls to it's command-line programs.

ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

lothar
A: 

with the GD2 library in PHP, you can rotate the image easily, store it temporarily as a PNG, and then use it in your page the same way you do now.

should be loads of scripts out there who give a great example of how to use GD2.

MiRAGe
A: 

I think that this is what you look for:

http://wilq32.adobeair.pl/jQueryRotate/Wilq32.jQueryRotate.html

Wilq32