ange007/poster-gen 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ange007/poster-gen

Composer 安装命令:

composer require ange007/poster-gen

包简介

Poster and image generator for news/aticles/other

README 文档

README

Use for:

  • Poster for your site or blog
  • Poster for social network
  • Poster for your promo materials ☻

Example Images

PosterGen

PosterGen

PosterGen

PosterGen

PosterGen

PosterGen

PosterGen

Dependencies

  • PHP >= 5.6
  • GD

Install

composer require ange007/poster-gen

Example Code

<?php
	use \PosterGen;
	
	// Generate poster
	$poster = ( new \PosterGen\PosterGen( [ ] ) )
		->setSize( 1280, 720 )
		->setBackgroundImage( __DIR__ . "/backgrounds/1.jpg" )
		->setHorizontalAlignment( 'center' )
		->setVerticalAlignment( 'center' )
		->setFontShadow( '#333333', -2, 2 )
		->setOverlayColor( '#FF0000' )
		->setBorder( 'black', 1 )
		// Title
		->setFont( __DIR__ . "/fonts/Roboto-Regular" )
		->setFontSize( 40 )
		->setFontColor( '#FFFFFF' )
		->addText( 'Microsoft buying GitHub' )
		->addText( '' )
		// Subtitle
		->setFont( __DIR__ . "/fonts/Blogger_Sans.otf" )
		->setFontSize( 20 )
		->setFontColor( '#00FFFF' )
		->addText( 'The deal is concluded' )
		// Watermark
		->setTextBackground( 'black', 50 )
		->setHorizontalAlignment( 'right' )
		->setVerticalAlignment( 'bottom' )
		->setFontSize( 14 )
		->setFontColor( '#FFFFFF' )
		->setFontShadow( '' )
		->setFontStroke( 'black' )
		->addText( 'http://news.com' );
		  
	// Poster output
	echo $poster->saveToBase64Image( );

Plans

  • Background position and adaptation
  • Text rotate
  • Image rotate

License

It is released under the MIT License.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固