Jump to content

Recommended Posts

Posted

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 'wwwroot.'/user/view.php?id='.$USER->id.'&course='.$COURSE->id.'">'.$CFG->wwwroot.'/user/pix.php?file=/'.$USER->id.'/f1.jpg';

 

Any ideas how I can change the img src to to allow me to merge and rotate?

 

 

 

Wes

Posted

Found it's really easy to use CSS to rotate the image as well as overlay it.

 

-moz-transform: rotate(30deg);

-o-transform: rotate(30deg);

-webkit-transform: rotate(30deg);

filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',M11=0.866, M12=-0.5, M21=0.5, M22=0.866);

-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='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).

 

 

 

 

Wes

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...