Watermark System (STWM2) [Deleted]

Got this error

Code:
Error: Call to undefined function xenMade\STWM\Util\imagettfbbox()
src/addons/xenMade/STWM/Util/Watermark.php:214

Stack trace
Code:
#0 src/addons/xenMade/STWM/Util/Watermark.php(121): xenMade\STWM\Util\Watermark->getTextSize('12', '0', 'styles/def...', 'Copyright 2018 ...')
#1 src/addons/xenMade/STWM/Util/Watermark.php(89): xenMade\STWM\Util\Watermark->generateWatermarkImage()
#2 src/addons/xenMade/STWM/XF/ControllerPlugin/Attachment.php(37): xenMade\STWM\Util\Watermark->__construct(Object(xenMade\STWM\XF\Entity\Attachment))
#3 src/XF/Pub/Controller/Attachment.php(43): xenMade\STWM\XF\ControllerPlugin\Attachment->displayAttachment(Object(xenMade\STWM\XF\Entity\Attachment))
#4 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Attachment->actionIndex(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Index', 'html', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\Attachment), NULL)
#6 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(1891): XF\Mvc\Dispatcher->run()
#8 src/XF.php(328): XF\App->run()
#9 index.php(13): XF::runApp('XF\\Pub\\App')
#10 {main}

Request state
Code:
<pre class='xdebug-var-dump' dir='ltr'>
<small>/app/src/XF/Debugger.php:28:</small>
<b>array</b> <i>(size=4)</i>
  'url' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'/index.php?attachments/dsc_114253-jpg.105/'</font> <i>(length=42)</i>
  'referrer' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'http://www.earl.com/index.php?resources/thirty-fifth-test-resource.47/'</font> <i>(length=68)</i>
  '_GET' <font color='#888a85'>=&gt;</font>
    <b>array</b> <i>(size=1)</i>
      'attachments/dsc_114253-jpg_105/' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>''</font> <i>(length=0)</i>
  '_POST' <font color='#888a85'>=&gt;</font>
    <b>array</b> <i>(size=0)</i>
      <i><font color='#888a85'>empty</font></i>
</pre>
[/ICODE]
 
Error: Call to undefined function xenMade\STWM\Util\imagettfbbox() src/addons/xenMade/STWM/Util/Watermark.php:214
On the server probably missing truetype
This function requires both the GD library and the FreeType library.
 
On the server probably missing truetype
This function requires both the GD library and the FreeType library.
yeah my bad, I already had GD but not the FreeType. got it fixed by installing FreeType library.
One more question, where should I suppose to put the watermark.png file?
I placed watermark.png files in root XF directory, and in src directory, and also inside the \addons\xenMade\STWM directory. but I only get the text watermark, image watermark doesn't work.
 
it doesn't matter! PHP should only have access to it...
i have it e.g. in the root of XF


no further error messages in the ACP?
Write to me on xenMade.com!
After rebuilding the VPS, it started working, but image opacity isn't working. I tried both png and jpeg, still, it's showing the watermark without reducing the opacity. I tried adding less opacity png as the watermark file, but it reproduces full opacity watermarked attachment from my less opacity watermark png file.
 
After rebuilding the VPS, it started working, but image opacity isn't working. I tried both png and jpeg, still, it's showing the watermark without reducing the opacity. I tried adding less opacity png as the watermark file, but it reproduces full opacity watermarked attachment from my less opacity watermark png file.
i have send u a fix
 
@au lait

Just updated from 1.1.0 to 1.1.2. I disabled the addon , then updated as per instructions. Now getting the following error

ErrorException: [E_WARNING] imagecopy() expects parameter 2 to be resource, object given in src/addons/xenMade/STWM/Util/Watermark.php at line 137
  1. XF::handlePhpError()
  2. imagecopy() in src/addons/xenMade/STWM/Util/Watermark.php at line 137
  3. xenMade\STWM\Util\Watermark->generateWatermarkImage() in src/addons/xenMade/STWM/Util/Watermark.php at line 78
  4. xenMade\STWM\Util\Watermark->__construct() in src/addons/xenMade/STWM/XF/ControllerPlugin/Attachment.php at line 37
  5. xenMade\STWM\XF\ControllerPlugin\Attachment->displayAttachment() in src/XF/Pub/Controller/Attachment.php at line 43
  6. XF\Pub\Controller\Attachment->actionIndex() in src/XF/Mvc/Dispatcher.php at line 249
  7. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
  8. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  9. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1891
  10. XF\App->run() in src/XF.php at line 328
  11. XF::runApp() in index.php at line 13
 
@au lait

Just updated from 1.1.0 to 1.1.2. I disabled the addon , then updated as per instructions. Now getting the following error

ErrorException: [E_WARNING] imagecopy() expects parameter 2 to be resource, object given in src/addons/xenMade/STWM/Util/Watermark.php at line 137
  1. XF::handlePhpError()
  2. imagecopy() in src/addons/xenMade/STWM/Util/Watermark.php at line 137
  3. xenMade\STWM\Util\Watermark->generateWatermarkImage() in src/addons/xenMade/STWM/Util/Watermark.php at line 78
  4. xenMade\STWM\Util\Watermark->__construct() in src/addons/xenMade/STWM/XF/ControllerPlugin/Attachment.php at line 37
  5. xenMade\STWM\XF\ControllerPlugin\Attachment->displayAttachment() in src/XF/Pub/Controller/Attachment.php at line 43
  6. XF\Pub\Controller\Attachment->actionIndex() in src/XF/Mvc/Dispatcher.php at line 249
  7. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
  8. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  9. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1891
  10. XF\App->run() in src/XF.php at line 328
  11. XF::runApp() in index.php at line 13
This is only a problem if you use "Imagemagick"!
A patch is now available! Sorry!
 
Hi @au lait
I just bought the addon, but its doesn't seen to work, I did trying Watermark-Type: Image and Watermark-Type: Text.
I also enable display watermark in user group. I am using xf v2.1.0 Beta 5. But i dont have Imagick
Thank you
 
Top Bottom