https://github.com/ange007/postergen
Poster and image generator for news/aticles/other.
https://github.com/ange007/postergen
image image-generation image-manipulation image-processing php php-library php7 poster
Last synced: 8 months ago
JSON representation
Poster and image generator for news/aticles/other.
- Host: GitHub
- URL: https://github.com/ange007/postergen
- Owner: ange007
- License: mit
- Created: 2019-05-29T20:50:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-30T16:20:39.000Z (about 7 years ago)
- Last Synced: 2025-02-12T17:50:17.705Z (over 1 year ago)
- Topics: image, image-generation, image-manipulation, image-processing, php, php-library, php7, poster
- Language: PHP
- Homepage:
- Size: 4.25 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## PosterGen - News and Articles poster generator
Use for:
* Poster for your site or blog
* Poster for social network
* Poster for your promo materials ☻
## Example Images







## Dependencies
* PHP >= 5.6
* GD
## Install
```
composer require ange007/poster-gen
```
## Example Code
```php
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](LICENSE).