- Posts: 6
COMMUNITY FORUM
[EXTENSION] How to add Watermark to images?
- andy
-
Topic Author
- Offline
- New Member
Less
More
11 years 5 months ago #121912
by andy
[EXTENSION] How to add Watermark to images? was created by andy
Hello,
I am looking for a way to add .png watermark to all images.
I tried different solution found here but none worked for me. Appreciate any help.
Txs
I am looking for a way to add .png watermark to all images.
I tried different solution found here but none worked for me. Appreciate any help.
Txs
The topic has been locked.
- Yiota
-
- Visitor
11 years 5 months ago #121913
by Yiota
Replied by Yiota on topic Re: How to add Watermark to images?
The topic has been locked.
- andy
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 6
11 years 5 months ago #121914
by andy
Replied by andy on topic Re: How to add Watermark to images?
Txs, but documentation is few for my knowledge, where to add the code? do I need to create a new file...?! etc...?some extra instructions would be perfect.
The topic has been locked.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 5 months ago #121915
by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: How to add Watermark to images?
Actually the links at that post offer detailed documentation? Did you read pilotaz.blogspot.it/2011/09/joomla-k2-watermark-image.html ?
The topic has been locked.
- felipergueza
-
- Offline
- Elite Member
Less
More
- Posts: 174
11 years 4 months ago #121916
by felipergueza
Replied by felipergueza on topic Re: How to add Watermark to images?
You can use the following extension extensions.joomla.org/extensions/extension-specific/k2-extensions/20544How to add Watermark to images?
Attachment not found
The topic has been locked.
- JOsh
-
- Visitor
10 years 8 months ago #121917
by JOsh
Replied by JOsh on topic Re: How to add Watermark to images?
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();
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();
The topic has been locked.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 8 months ago #121918
by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: How to add Watermark to images?
I think the extension's developer will be better suited to solve this issue.
The topic has been locked.
- JOsh
-
- Visitor
10 years 8 months ago #121919
by JOsh
Replied by JOsh on topic Re: How to add Watermark to images?
I guess, its not an extension just some code that was link to from this discussion. The link was quite old so may not be live anymore.
Is there a suggestion way from the K2 community or support on how best to add a watermark to images?
I use the standard k2 tools and gallery pro.
Is there a suggestion way from the K2 community or support on how best to add a watermark to images?
I use the standard k2 tools and gallery pro.
The topic has been locked.