PHPackages                             ibnux/generic-book-cover - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ibnux/generic-book-cover

ActiveLibrary

ibnux/generic-book-cover
========================

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

041PHP

Since Oct 23Pushed 3y agoCompare

[ Source](https://github.com/ibnux/php-generic-book-cover)[ Packagist](https://packagist.org/packages/ibnux/generic-book-cover)[ RSS](/packages/ibnux-generic-book-cover/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-generic-book-cover
======================

[](#php-generic-book-cover)

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](https://github.com/kyrretl).

### Installation

[](#installation)

Install using Composer:

```
composer require ibnux/covergenerator dev-master
```

The package requires ImageMagick and Ghostscript.

### Usage example

[](#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

[](#example-covers)

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

[![Cover 1](examples/cover1.png)](examples/cover1.png)[![Cover 2](examples/cover2.png)](examples/cover2.png)[![Cover 3](examples/cover3.png)](examples/cover3.png)[![Cover 4](examples/cover4.png)](examples/cover4.png)

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 54.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ccd477d33e9477230a3b460e1f026e43b95051d740d96e2c190191154dd1fb1?d=identicon)[ibnux](/maintainers/ibnux)

---

Top Contributors

[![ibnux](https://avatars.githubusercontent.com/u/811955?v=4)](https://github.com/ibnux "ibnux (6 commits)")[![danmichaelo](https://avatars.githubusercontent.com/u/434495?v=4)](https://github.com/danmichaelo "danmichaelo (5 commits)")

### Embed Badge

![Health badge](/badges/ibnux-generic-book-cover/health.svg)

```
[![Health](https://phpackages.com/badges/ibnux-generic-book-cover/health.svg)](https://phpackages.com/packages/ibnux-generic-book-cover)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
