Hello, I follow the instructions re pilotaz.blogspot.it/2011/09/joomla-k2-watermark-image.html as best I could but still nothing.
I presume one creates a png image (watermark.png) and uploads it to the joomla directory. Does it have to be a certain size/resolution?
In my item.php file the following lines are so with the added info. Any tips would be greatly appreciated.
"line 303 - $img_url_watermark = "../images/watermark.png";
//Original image
line 313 - $handle->image_watermark = $img_url_watermark;
$handle->image_watermark_position = "TL";
line 318- //gallery watermark
if($dir = opendir($savepath.DS.$row->id)) {
while (false !== ($file = readdir($dir))) {
$handle = new Upload ($savepath.DS.$row->id.'/'.$file);
$handle->allowed = array('image/*');
$handle->file_auto_rename = false;
$handle->file_overwrite = true;
$handle->image_resize = ture;
$handle->image_x = 1024;
$handle->image_ratio_y = true;
$handle->image_watermark = $img_url_watermark;
$handle->image_watermark_position = "TL";
$handle->image_convert = "jpg";
$handle->jpeg_quality = 85;
$handle->Process($savepath.DS.$row->id);
$handle->Clean();
}
closedir($dir);
}
Line - 443 - if (!JArchive::extract($savepath.DS.$handle->file_dst_name, $savepath.DS.$row->id)) {
$mainframe->redirect('index.php?option=com_k2&view=items', JText::_('Gallery upload error: Cannot extract archive!'), 'error');
} else {
$row->gallery = '{gallery}'.$row->id.'{/gallery}';
}
JFile::delete($savepath.DS.$handle->file_dst_name);
$handle->Clean();