- Posts: 4
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- I'm just trying to add a png watermark on image upload
I'm just trying to add a png watermark on image upload
- alexandre barbe
- Topic Author
- Offline
- New Member
Less
More
14 years 3 months ago #84302
by alexandre barbe
I'm just trying to add a png watermark on image upload was created by alexandre barbe
Hi there, like the title said, i try to put a watermark on my images, but with no success... I put : $handle->image_watermark = 'path to the watermark' in com_k2 > models > item.php where my small image is handle, but its a fail, no watermark at all. Anyone have a clue ?
Please Log in or Create an account to join the conversation.
- alexandre barbe
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
14 years 3 months ago #84303
by alexandre barbe
Replied by alexandre barbe on topic I'm just trying to add a png watermark on image upload
I think i'm sadly the only one who try this :/
This is very strange, when i add a reflection ( $handle->image_reflection_height = '25%';) it work
when i add rotate or crop ($handle->image_rotate = 90; $handle->image_crop = array(50,40,30,20);) it work, there were only the watermark who doesn't work...
This is very strange, when i add a reflection ( $handle->image_reflection_height = '25%';) it work
when i add rotate or crop ($handle->image_rotate = 90; $handle->image_crop = array(50,40,30,20);) it work, there were only the watermark who doesn't work...
Please Log in or Create an account to join the conversation.
- BFL
- Offline
- New Member
Less
More
- Posts: 5
13 years 11 months ago #84304
by BFL
Replied by BFL on topic I'm just trying to add a png watermark on image upload
Did you find an answer?
Please Log in or Create an account to join the conversation.
- JTJ van Loendersloot
- Offline
- New Member
Less
More
- Posts: 4
13 years 11 months ago #84305
by JTJ van Loendersloot
Replied by JTJ van Loendersloot on topic I'm just trying to add a png watermark on image upload
You have to put in the full path to your watermark.png.
$handle->image_watermark '/home/{user}/public_html/...../watermark.png' if you are on a linux server.
$handle->image_watermark '/home/{user}/public_html/...../watermark.png' if you are on a linux server.
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
13 years 9 months ago #84306
by BBC
Replied by BBC on topic I'm just trying to add a png watermark on image upload
Could you explain a little bit more that ? I am trying to get it to work with Wamp (Windows).
Tried everything but it wont work.
Tried everything but it wont work.
Please Log in or Create an account to join the conversation.
- JTJ van Loendersloot
- Offline
- New Member
Less
More
- Posts: 4
13 years 9 months ago #84307
by JTJ van Loendersloot
Replied by JTJ van Loendersloot on topic I'm just trying to add a png watermark on image upload
I'm have a debian server, so you should ask someone else. I use the complete base path.
Put $handle->image_watermark = 'path to the watermark' in administrator > components > com_k2 > models > item.php
So you get something like this:
around line 213;
//XLarge image
//location of the watermark
$handle->image_watermark = '/home/*************/public_html/images/stories/watermark/watermark_xl.png';
//position of the watermark
$handle->image_watermark_position = 'BR';
$handle->image_resize = true;
$handle->image_ratio_y = true;
$handle->image_convert = 'jpg';
$handle->jpeg_quality = $params->get('imagesQuality');
$handle->file_auto_rename = false;
$handle->file_overwrite = true;
$handle->file_new_name_body = $filename.'_XL';
if (JRequest::getInt('itemImageXL')) {
$imageWidth = JRequest::getInt('itemImageXL');
} else {
$imageWidth = $params->get('itemImageXL', '800');
}
$handle->image_x = $imageWidth;
$handle->Process($savepath);
Put $handle->image_watermark = 'path to the watermark' in administrator > components > com_k2 > models > item.php
So you get something like this:
around line 213;
//XLarge image
//location of the watermark
$handle->image_watermark = '/home/*************/public_html/images/stories/watermark/watermark_xl.png';
//position of the watermark
$handle->image_watermark_position = 'BR';
$handle->image_resize = true;
$handle->image_ratio_y = true;
$handle->image_convert = 'jpg';
$handle->jpeg_quality = $params->get('imagesQuality');
$handle->file_auto_rename = false;
$handle->file_overwrite = true;
$handle->file_new_name_body = $filename.'_XL';
if (JRequest::getInt('itemImageXL')) {
$imageWidth = JRequest::getInt('itemImageXL');
} else {
$imageWidth = $params->get('itemImageXL', '800');
}
$handle->image_x = $imageWidth;
$handle->Process($savepath);
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
13 years 8 months ago #84308
by BBC
Replied by BBC on topic I'm just trying to add a png watermark on image upload
Developers did something in new 2.5 SVN version.
Regarding watermark and images crop options.
So, it should be easy now. Just to make it to settings in xml files. :)
Regarding watermark and images crop options.
So, it should be easy now. Just to make it to settings in xml files. :)
Please Log in or Create an account to join the conversation.
- bunglehaze
- Offline
- Elite Member
Less
More
- Posts: 168
13 years 8 months ago #84309
by bunglehaze
Replied by bunglehaze on topic I'm just trying to add a png watermark on image upload
Any idea what the watermark setting is in 2.5SVN? I cannot find anything about this in my install...
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
13 years 7 months ago #84310
by BBC
Replied by BBC on topic I'm just trying to add a png watermark on image upload
There is nothing in settings. Search forum how to fix it in files.
Please Log in or Create an account to join the conversation.
- bunglehaze
- Offline
- Elite Member
Less
More
- Posts: 168
13 years 7 months ago #84311
by bunglehaze
Replied by bunglehaze on topic I'm just trying to add a png watermark on image upload
There is already a fix in this thread which works perfectly well, I asked you to elaborate on your quote below as you seem to imply that something has been changed to make it simpler. How can you make statements like this, if you do not know the changes yourself?
Developers did something in new 2.5 SVN version.
Regarding watermark and images crop options.
So, it should be easy now. Just to make it to settings in xml files. :)
Developers did something in new 2.5 SVN version.
Regarding watermark and images crop options.
So, it should be easy now. Just to make it to settings in xml files. :)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- I'm just trying to add a png watermark on image upload