承接 joseluisq/gimage 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

joseluisq/gimage

最新稳定版本:v4.0.0

Composer 安装命令:

composer require joseluisq/gimage

包简介

A PHP library for easy image handling.

README 文档

README

Build Status Latest Unstable Version Total Downloads License

A PHP library for easy image handling. 🖼

GImage is a simple and small library based on PHP Image Processing and GD for processing images easily.

A simple presentation card with GImage

Presentation card built with GImage - View code example

Features

  • Load an image from a local path, URL or image resource.
  • Create shapes such as rectangles or ellipses with opacity.
  • Resize, scale or crop images proportionally.
  • Rotate images, shapes or texts.
  • Embed text with custom TTF fonts.
  • Compose a pool of images with Canvas.
  • Swap image formats such as JPEG, PNG or GIF.
  • Save images locally or output them on the browser.
  • Save several copies of the same image.
  • Render an image in memory and return its resource.

Requirements

GImage requires PHP 7.4 or a recent PHP version with the latest GD Extension.

Install

composer require joseluisq/gimage

Usage

Load an external PNG image and save it as JPG:

<?php

use GImage\Image;

// PNG image (600x199)
$url = 'https://i.imgur.com/G5MR088.png';

$arch = new Image();
$arch
    // Load from URL
    ->load($url)
    // Scale to 50% (300x99)
    ->scale(0.5)
    // Change the format to JPG
    ->toJPG()
    // Saving in local path
    ->save('arch.jpg');

See GImage Website for detailed usage instructions and more advanced examples.

Changelog

Check out the CHANGELOG.md file.

Examples

See code examples directory.

Development

Run tests

Via Composer

composer install
composer run-script test

Via Docker (multi PHP versions test)

make docker-tests

Contribution

Feel free to send some Pull request or file an issue.

License

This work is primarily distributed under the terms of the MIT license.

©2015-present Jose Quintana

统计信息

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

GitHub 信息

  • Stars: 152
  • Watchers: 10
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-15