Download the PHP package javion/image without Composer

On this page you can find all versions of the php package javion/image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package image

Image类库

1、使用场景

2、配置说明(默认配置如下)

$config = [

 /**
  * 水印字体(默认字体不支持中文,请按需配置需要的字体)
  */
 'font'       => __DIR__ . '/font.ttf',

 /**
  * 水印位置(1~9,9宫格位置,其他为随机)
 */
 'pos'        => 9,

 /**
  * 相对pos的x偏移量
  */
 'posX'       => 0,

 /**
  * 相对pos的y偏移量
  */
 'posY'       => 0,

 /*
  * 水印透明度
  * 填写0~100间的数字,100为不透明
 */
 'opacity'        => 100,

 /**
  * 透明度参数 alpha,其值从 0 到 127。0 表示完全不透明,127 表示完全透明
  */
 'alpha'         => 0,

 /*
  * 默认水印文字
  */
 'text'       => 'Javion',

 /*
  * 文字颜色 颜色使用16进制表示
 */
 'textColor' => '#FF4040',

 /*
  * 文字大小
  */
 'textSize'  => 12,

 ];

3、方法说明

类初始化

参数 是否必传
image 原图片路径
config 配置数组,根据业务自定义配置,无则为默认值

往原图添加水印图片

参数 是否必传
waterImg 水印图片路径
pos 水印位置
opacity 透明度
posX 位置x偏移量
posY 位置y偏移量

往原图添加水印文字

参数 是否必传
text 水印文字
pos 水印位置
textColor 颜色
textSize 文字size
alpha 透明度
posX 位置x偏移量
posY 位置y偏移量

设置水印文字类型文件

参数 是否必传
font 文字字体文件路径

输出图片(类型为png)

参数 是否必传
outImg 输出图片路径 是,例子:项目路径/runtime/
name 输出图片名称 否,默认out

销毁图片资源,释放内存(save方法会默认调用,若无调用save方法,则要手动调用)

4、使用

$a = __DIR__ . '/Javion.png';

$image = new Watermark($a);

b = __DIR__ . '/';

$c = __DIR__ . '/water.png';

$image->waterText('zzwtestd', 8)->waterImg($c, 2, 50)->save($b);

5、安装使用

composer require javion/image

All versions of image with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package javion/image contains the following files

Loading the files please wait ....