diff options
Diffstat (limited to 'images')
-rw-r--r-- | images/rotate.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/images/rotate.php b/images/rotate.php new file mode 100644 index 0000000..ae0df87 --- /dev/null +++ b/images/rotate.php @@ -0,0 +1,20 @@ +<?php
+// File and rotation
+$filename = 'OverlayStart50.png';
+
+$degrees = $_GET['r'] * 90;
+//$degrees = 180;
+
+// Content type
+header('Content-type: image/jpeg');
+
+// Load
+$source = imagecreatefrompng($filename);
+
+// Rotate
+$rotate = imagerotate($source, $degrees, 0);
+
+// Output
+imagepng($rotate);
+
+?>
\ No newline at end of file |