PHPackages                             carica/canvas-graphics - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. carica/canvas-graphics

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

carica/canvas-graphics
======================

1201PHP

Since Feb 7Pushed 6y ago2 watchersCompare

[ Source](https://github.com/ThomasWeinert/Canvas-Graphics)[ Packagist](https://packagist.org/packages/carica/canvas-graphics)[ RSS](/packages/carica-canvas-graphics/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Implementing the JS Canvas API in PHP (around GD). Not fully featured but in a way that allows to port code from JS to PHP.

Some time ago I read that really interesting blog post about [SVG placeholders](https://jmperezperez.com/svg-placeholders/).

In this repository I try to experiment with the different ideas from the article. I try to find out if it is possible to use them in a PHP application.

Experiments
-----------

[](#experiments)

### Colors

[](#colors)

Extracts some colors from an image. The implementation is forked from [ColorThiefPHP](https://github.com/ksubileau/color-thief-php). Unlike the original Black and White are allowed and the handling of the alpha transparency is different.

I treat alpha transparency as it would be with a white background.

[![Colors](docs/images/colors.png?raw=true)](docs/images/colors.png?raw=true)

### Gradients

[](#gradients)

A loose adoption of [Gradify](https://github.com/fraser-hemp/gradify). It extracts the four colors using the palette from the Colors experiment.

[![Gradients](docs/images/gradients.png?raw=true)](docs/images/gradients.png?raw=true)

### Paths

[](#paths)

Traces an bitmap and creates SVG paths. Based on [ImageTracerJS](https://github.com/jankovicsandras/imagetracerjs).

[![ImageTracer](docs/images/trace-paths.png?raw=true)](docs/images/trace-paths.png?raw=true)

### [Primitive](docs/primitive.md)

[](#primitive)

This concept tries to reproduce the original image using primitive shapes (triangle, rect, ellipse). Very few shapes and a strong blur the result is good impression of the image, already. The result is impressive, but it is expensive (cpu, memory) to create.

[![Primitive](docs/images/primitive.png?raw=true)](docs/images/primitive.png?raw=true)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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://avatars.githubusercontent.com/u/236825?v=4)[Thomas Weinert](/maintainers/ThomasWeinert)[@ThomasWeinert](https://github.com/ThomasWeinert)

---

Top Contributors

[![ThomasWeinert](https://avatars.githubusercontent.com/u/236825?v=4)](https://github.com/ThomasWeinert "ThomasWeinert (69 commits)")

### Embed Badge

![Health badge](/badges/carica-canvas-graphics/health.svg)

```
[![Health](https://phpackages.com/badges/carica-canvas-graphics/health.svg)](https://phpackages.com/packages/carica-canvas-graphics)
```

PHPackages © 2026

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