承接 andrewgjohnson/imageblendedcolorallocate 相关项目开发

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

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

andrewgjohnson/imageblendedcolorallocate

最新稳定版本:v1.1.1

Composer 安装命令:

composer require andrewgjohnson/imageblendedcolorallocate

包简介

imageblendedcolorallocate is a function that will allocate a new blended color based on two existing allocated colors for your PHP GD images

README 文档

README

MIT License Current Release Contributors Packagist Downloads Issues Patreon

Description

imageblendedcolorallocate is a function that will allocate a new blended color based on two existing allocated colors for your PHP GD images.

Patreon - Become a Patron

imageblendedcolorallocate is an agjgd project.

Usage

With Composer

This project offers support for the Composer dependency manager. You can find the imageblendedcolorallocate package online on packagist.org.

Install using Composer

Either run this command:

composer require andrewgjohnson/imageblendedcolorallocate

or add this to the require section of your composer.json file:

"andrewgjohnson/imageblendedcolorallocate": "1.*"

Without Composer

To use without Composer add an include to the imageblendedcolorallocate.php source file.

include_once 'source/imageblendedcolorallocate.php';

Examples

// Allocate red and yellow using the standard method then blend the two to allocate orange
$red    = imagecolorallocate($im, 0xFF, 0x00, 0x00);
$yellow = imagecolorallocate($im, 0xFF, 0xFF, 0x00);
$orange = imageblendedcolorallocate($im, $red, $yellow);

// You can also allocate RGBA colors as well as RGB
$opaqueBlack      = imagecolorallocatealpha($im, 0x00, 0x00, 0x00, 0);
$translucentBlack = imagecolorallocatealpha($im, 0x00, 0x00, 0x00, 63);
$blendedBlack     = imageblendedcolorallocate($im, $opaqueBlack, $translucentBlack);

// By default, we allocate with a 50/50 blend where we average the red, blue, green and alpha values for each color but also support alternative blends
$blue              = imagecolorallocate($im, 0x00, 0x00, 0xFF);
$cyan              = imagecolorallocate($im, 0x00, 0xFF, 0xFF);
$blendedMostlyCyan = imageblendedcolorallocate($im, $blue, $cyan, 0.25); // 25% blue, 75% cyan
$blendedEvenly     = imageblendedcolorallocate($im, $blue, $cyan); // 50% blue, 50% cyan
$blendedMostlyBlue = imageblendedcolorallocate($im, $blue, $cyan, 0.75); // 75% blue, 25% cyan

There are other examples included in the GitHub repository and on imageblendedcolorallocate.agjgd.org.

Help Requests

Please post any questions in the discussions area on GitHub if you need help.

If you discover a bug please enter an issue on GitHub. When submitting an issue please use our issue template.

Contributing

Please read our contributing guidelines if you want to contribute.

You can contribute financially by becoming a patron at patreon.com/agjopensource to support imageblendedcolorallocate and other agjgd.org projects.

Patreon - Become a Patron

Acknowledgements

This project was started by Andrew G. Johnson (@andrewgjohnson).

Full list of contributors:

Our security policies and procedures comes via the atomist/samples project. Our issue templates comes via the tensorflow/tensorflow project. Our pull request template comes via the stevemao/github-issue-templates project. The mountains photo comes via Gabriel Garcia Marengo.

Changelog

You can find all notable changes in the changelog.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固