public function getImage($objUser) { $img = ImageCreateFromString(base64_decode($this->getFrom('imagedata', 'data'))); $objPicture = new clsPicture($this->get('picture_id')); if (!$objPicture->hasViewed($objUser)) { $newImage = clsThumbnail::getNewImage(); list($newWidth, $newHeight) = clsThumbnail::getNewSize(); ImageCopyMerge($img, $newImage, $this->get('actual_width') - $newWidth, $this->get('actual_height') - $newHeight, 0, 0, $newWidth, $newHeight, 75); ImageDestroy($newImage); } return $img; }