diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-03-10 12:48:42 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-03-10 12:48:42 -0700 |
commit | fddc68fcc46f199d93e119cb1f7e86949835ffc3 (patch) | |
tree | 73f418c282e29bddbcfb1ec62c4f4a0021d4443c /images | |
parent | 986eb95647428e8af0a14c7cc2c20ed9659cbac5 (diff) | |
download | pathery-fddc68fcc46f199d93e119cb1f7e86949835ffc3.tar.xz |
Image rotation for emblems - started.
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 |