Moodle Theme and PHP
Just wondered if anyone knew how I would be able to dynamically rotate the profile pics and merge it with a default pic? As i want to frame the profile pic with another PNG file and rotate the combined image through 45 degress? i've tried imagerotate but I don't seem to be able to get it working? I'm using the Aarkvark theme and in the profileblock.php page it has the following to display the current user's profile pic:
echo '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&course='.$COURSE->id.'"><img src="'.$CFG->wwwroot.'/user/pix.php?file=/'.$USER->id.'/f1.jpg" width="80px" height="80px" title="'.$USER->firstname.' '.$USER->lastname.'" alt="'.$USER->firstname.' '.$USER->lastname.'" /></a>';
Any ideas how I can change the img src to to allow me to merge and rotate?
Can you not just batch rotate the actual source images? If it is a one time need that would probably be best.
Found it's really easy to use CSS to rotate the image as well as overlay it.
filter: progid:DXImageTransform.Microsoft.Matrix(sizingMet hod='auto expand',M11=0.866, M12=-0.5, M21=0.5, M22=0.866);
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMe thod='auto expand',M11=0.866, M12=-0.5, M21=0.5, M22=0.866)";
Each of these rotates the picture by 30 degrees however MS and Firefox don't agree with each other as to the final location (IE looks much better actually, seems to be keeping the image proportions which makes the image sharper).