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

0222PHP

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 today

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

Maintenance34

Infrequent updates — may be unmaintained

Popularity13

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://avatars.githubusercontent.com/u/33772554?v=4)[Tushar Sawant](/maintainers/tusharsawant2427)[@tusharsawant2427](https://github.com/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

[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)[rsoury/wp-imgix

Rewrites WordPress image URLs to use ImgIX

167.2k](/packages/rsoury-wp-imgix)

PHPackages © 2026

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