CodeIgniter Forums
Rotate Image via Javascript - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Rotate Image via Javascript (/showthread.php?tid=32486)



Rotate Image via Javascript - El Forum - 07-25-2010

[eluser]Fireclave[/eluser]
Hi,

i will rotate a image via Prototype or jQuery, but i have no idea, how i can handle it...
have any a hint or a sample code ?

I have overwritten the example of www.derekallard.com, but this is not working.
Have any a simple example, how to call a Controller+Method with a Link and output the rotated image to the view, without reload ?


Rotate Image via Javascript - El Forum - 07-25-2010

[eluser]pickupman[/eluser]
You can create a controller that outputs/streams images. If you use headers like
Code:
header('Content-type: image/jpg');

//Open and output rotated image here
I do this on a couple of site to protect someone hotlinking to a image. All request are go through controller, where session can be checked, and authenticated.