Skip to content

stone-shawn/yii-watermark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

A Yii watermark extension using a exsited watermark class on github 
which is:https://github.com/Dariusp/php-simple-watermark
And in fact I did some modifications on this class to perform with more image types like png,gif

Example:

<pre>
In Yii config file:


'components' => array(
    .....
    'watermark' => array(
      'class' => 'Yiiwatermark',
      'watermarkImage' => '/themes/blue/assets/images/watermark.png',
    ),
    .....
),

</pre>

<h3>Useage in PHP controller or other places:</h3>
<pre>
$sourceImage = 'D:\www\project1\images\upload\hello.jpg';
Yii::app()->watermark->setWatermark($sourceImage, Watermark::CENTER);
</pre>

About

A yii watermark

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages