Download the PHP package nickbai/poster without Composer

On this page you can find all versions of the php package nickbai/poster. 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 poster

poster

介绍

基于gd库、phpqrcode

PHP海报生成插件,极速生成方便快捷。

快速生成海报、生成签到日、生成二维码、合成二维码、图片添加水印

提示:

1.新增批量处理方法

2.新增字体加粗参数

3.新增字体间隔参数

4.保存路径支持绝对路径和相对路径(相对路径默认项目根目录,当不存在时,默认保存到tests/poster)

authors

lang [email protected]

安装或更新教程

  1. composer require kkokk/poster
  2. composer update kkokk/poster

使用说明

注意:没有特别说明,统一都是px。

文档地址:http://www.520yummy.com/composer/poster/doc.html

演示效果

输入图片说明

演示地址:暂无

​ 生成签到日历海报、邀请海报

引用海报类
创建画布

参数说明

变量 类型 必填 注释
w number 画布宽
h number 画布高
rgba array 颜色rbga,[255,255,255,1]
alpha boolean 是否透明,是:true
创建指定图片为画布

参数说明

变量 类型 必填 注释
src source 图像资源
w number 画布宽,默认原图宽
h number 画布高,默认原图高
rgba array 颜色rbga,[255,255,255,1]
alpha boolean 是否透明,默认false
合成图片

参数说明

变量 类型 必填 注释
src string 路径,支持网络图片(带http或https)
dst_x number|string 目标x轴 特殊值 center 居中 支持百分比20% 支持自定义 支持正负
dst_y number|string 目标y轴 特殊值 center 居中 支持百分比20% 支持自定义 支持正负
src_x number 图片x轴,默认0
src_y number 图片y轴,默认0
src_w number 图片自定义宽,默认原宽
src_h number 图片自定义高,默认原高
alpha boolean 是否透明,true:是
type string 图片变形类型,正常形状:'normal',圆形:'circle' ,默认normal
批量合成图片

参数说明:与合成图片参数一致。

合成二维码

参数说明

变量 类型 必填 注释
text string 内容,例如:http://www.520yummy.com
dst_x number|string 画布位置x 特殊值 center 居中 支持百分比20% 支持自定义 支持正负
dst_y number|string 画布位置y 特殊值 center 居中 支持百分比20% 支持自定义 支持正负
src_x number 图片x轴,默认0
src_y number 图片y轴,默认0
src_w number 图片自定义宽,默认原宽
src_h number 图片自定义高,默认原高
alpha integer 大小,默认4
margin integer 白边大小,默认1
批量合成二维码

参数说明:与合成二维码参数一致。

合成文字

参数说明

变量 类型 必填 注释
content string 内容,例如:http://www.520yummy.com
dst_x number|string|array 画布位置x ;特殊值 center 居中;居中并向左偏移 ['center',-5], 居中并向右偏移 ['center',5]
dst_y number 画布位置y,默认0
font number 字体大小,默认16
rgba number 颜色rbga,[255,255,255,1]
max_w number 最大换行宽度,默认0不换行。达到换行宽度自动换行
font_family number 字体,可不填,有默认 (相对路径为项目根目录)
weight integer 字体粗细 默认字体大小
space integer 字体间距 默认无
批量合成文字

参数说明:与合成文字参数一致。

获取海报

参数说明:无。

返回说明:返回数组,返回文件地址。

处理海报、图片

参数说明:无。

返回说明:处理原图片资源,无返回。

输出图片流

参数说明:无。

返回说明:返回文件流,可输出到浏览器或img标签。

生成二维码

参数说明

变量 类型 必填 注释
text string 二维码包含的内容,可以是链接、文字、json字符串等等,例如:http://www.520yummy.com
outfile boolean|string 默认为false,不生成文件,只将二维码图片返回输出;否则需要给出存放生成二维码图片的文件名及路径
level string 容错级别,默认为L, 可传递的值分别是L(QR_ECLEVEL_L,7%)、M(QR_ECLEVEL_M,15%)、Q(QR_ECLEVEL_Q,25%)、H(QR_ECLEVEL_H,30%)。这个参数控制二维码容错率,不同的参数表示二维码可被覆盖的区域百分比,也就是被覆盖的区域还能识别
size integer 控制生成图片的大小,默认为4
margin integer 控制生成二维码的空白区域大小,默认4
saveandprint boolean 保存二维码图片并显示出来,outfile 必须传递图片路径,默认false

返回说明:outfile 为空,输出二维码图片,不生成文件;否则返回图片路径。

示例

静态调用
实例化调用

All versions of poster with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
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 nickbai/poster contains the following files

Loading the files please wait ....