定制 ibnux/generic-book-cover 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ibnux/generic-book-cover

Composer 安装命令:

composer require ibnux/generic-book-cover

包简介

PHP package to generate generic book covers for books where no original cover is available.

README 文档

README

This is a small package for generating generic book covers that can be used with online book displays, etc. in cases where no original cover is available.

The cover elements (title, subtitle, creators, etc.) will be sized, adjusted and possibly wrapped automatically. This works quite well in most cases, but the result will certainly not be visually/typographically pleasant in all cases. The package doesn't currently provide any options for manually adjusting the arrangement of cover elements.

The package is based on a script by @kyrretl.

Installation

Install using Composer:

composer require ibnux/covergenerator dev-master

The package requires ImageMagick and Ghostscript.

Usage example

require('vendor/autoload.php');
use ibnux\GenericBookCover\BookCover;

$cover = new BookCover();
$cover->setTitle('Manual of scientific illustration')
	->setSubtitle('with special chapters on photography, cover design and book manufacturing')
	->setCreators('Charles S. Papp')
	->setEdition('3rd enl. ed.')
	->setPublisher('American Visual Aid Books')
	->setDatePublished('1976')
	->setRandomBackgroundColor()
	->save('cover1.png');

Instead of saving the cover to a file, you can also get the image data and serve it directly:

header('Content-Type: image/png');
echo $cover->getImageBlob();

Example covers

See examples/examples.php for the source code for the example covers.

Cover 1 Cover 2 Cover 3 Cover 4

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固