Changeset 697 for trunk/jabberit_messenger/inc/getphoto.php
- Timestamp:
- 03/12/09 11:32:55 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/inc/getphoto.php
r551 r697 176 176 $photoHeight = 90; 177 177 $newImage = imagecreatetruecolor($photoWidth,$photoHeight); 178 178 179 179 if($photo) 180 180 { 181 181 $photo = imagecreatefromstring($photo); 182 $trans = imagecolortransparent($photo);183 182 imagecopyresized($newImage,$photo,0,0,0,0,$photoWidth,$photoHeight,imagesx($photo),imagesy($photo)); 184 imagepng($newImage);185 imagedestroy($newImage);186 183 } 187 184 else 188 185 { 189 186 $photo = @imagecreatefrompng("../templates/default/images/photo.png"); 190 $trans = imagecolortransparent($photo);191 187 imagecopyresized($newImage,$photo,0,0,0,0,$photoWidth,$photoHeight,imagesx($photo),imagesy($photo)); 192 imagepng($newImage); 193 imagedestroy($newImage); 194 } 188 } 189 190 ob_start(); 191 imagepng($newImage); 192 $imagePhoto = ob_get_contents(); 193 imagedestroy($newImage); 194 ob_end_clean(); 195 printf("%s",base64_encode($imagePhoto)); 195 196 } 196 197 else
Note: See TracChangeset
for help on using the changeset viewer.