PHPackages                             packitifotech/laragdads - 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. [Image &amp; Media](/categories/media)
4. /
5. packitifotech/laragdads

ActiveLibrary[Image &amp; Media](/categories/media)

packitifotech/laragdads
=======================

Create ads banner using GD Image library

0208PHP

Since Apr 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tusharsawant2427/laravelgdads)[ Packagist](https://packagist.org/packages/packitifotech/laragdads)[ RSS](/packages/packitifotech-laragdads/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel GD Ads
==============

[](#laravel-gd-ads)

A PHP class for **Creating ads banner** from an image. Uses PHP and GD, Imagick or Gmagick, color-thief-php libraries to make it happen.

[![example image](https://raw.githubusercontent.com/tusharsawant2427/laravelgdads/main/example.png)](https://raw.githubusercontent.com/tusharsawant2427/laravelgdads/main/example.png)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.2 or &gt;= PHP 8.0
- Fileinfo extension
- One or more PHP extensions for image processing:
    - GD &gt;= 2.0
    - Imagick &gt;= 2.0 (but &gt;= 3.0 for CMYK images)
    - Gmagick &gt;= 1.0
- Supports JPEG, PNG.

How to use
----------

[](#how-to-use)

### Install via Composer

[](#install-via-composer)

The recommended way to install Laravel Gd Ads is through [Composer](http://getcomposer.org):

```
composer require packitifotech/laragdads
```

### Get the dominant color from an image

[](#get-the-dominant-color-from-an-image)

```
use Packitifotech\Laragdads\Laragdads;
$image1 = public_path('fruits.jpg');
$image2 = public_path('orange.jpg');
$fontPath = public_path('FjallaOne-Regular.ttf');
$text = "The tree that bears the most fruit gets the most attention. Allow the fruit to fall and rot";
$gdImage = Laragdads::createHorizontalAdsBanner(fImagepath: $image1, sImagePath:$image2, fontPath:$fontPath, text:$text, resizeWidth:null, resizeHeight:null);
Laragdads::saveAdsBannerPng($horizontalAds, Storage::path('public/ads'));
```

The `$image1` and `$image2` variable must contain absolute path of the image on the server. The `$fontPath` variable must contain absolute path of the image on the server.

```
Laragdads::saveAdsBannerPng(gdImage: $gdImage, storagePath: $storagePath)
```

You can save banner gd instance image in png by calling `saveAdsBannerPng` method

Credits
-------

[](#credits)

### Author

[](#author)

by Tushar Sawant [itinfotech.in](http://www.itinfotech.in)

Based on the fabulous work done by Lokesh Dhakar [itinfotech.in](http://itinfotech.in)

### Thanks

[](#thanks)

- Kevin Subileau - For creating the \[\]).

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.8% 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/323d1d2688d00fdf5c626901b0dcfc641240b53c954c8318219a0de9f78f8d71?d=identicon)[tusharsawant2427](/maintainers/tusharsawant2427)

---

Top Contributors

[![tusharsawant2427](https://avatars.githubusercontent.com/u/33772554?v=4)](https://github.com/tusharsawant2427 "tusharsawant2427 (15 commits)")[![targetpublicationstushar-tech](https://avatars.githubusercontent.com/u/231218064?v=4)](https://github.com/targetpublicationstushar-tech "targetpublicationstushar-tech (1 commits)")

### Embed Badge

![Health badge](/badges/packitifotech-laragdads/health.svg)

```
[![Health](https://phpackages.com/badges/packitifotech-laragdads/health.svg)](https://phpackages.com/packages/packitifotech-laragdads)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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