Jump to content

Video Rotation


jereece

Recommended Posts

Hi everyone.  I am new to the forum.

 

I have a web cam displaying on my web site here.  I need to rotate the image 90 degrees clockwise.  I have been looking at the PHP code located here but can't seem to get it to work.  Below is the code for my feeble attempt at this, but I get a "Parse error: syntax error, unexpected T_VARIABLE"  error message on line 6.  I have a little experience with PHP but not a whole lot.  I am comfortable coding in Notepad, so if someone could help me with the code or someother PHP code that would work, I would appreciate it.

<?php

$fileName = "http://reecedogs.linksys-cam.com/img/video.mjpeg";

$angle = 90.0;


$bgColour = 0xFFFFFF; // red

$original = imagecreatefromjpeg($fileName);

$rotated = imagerotate($original, $angle, $bgColour);

header('Content-type: image/jpeg');

imagejpeg($rotated);
?>

 

 

Any help is deeply appreciated,

Jim

 

 

Link to comment
https://forums.phpfreaks.com/topic/206136-video-rotation/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.