andrewgjohnson/imagecolorallocatefromstring

imagecolorallocatefromstring 是一个函数,可以根据字符串为您的 PHP GD 图像分配颜色

v1.0.2 2022-11-23 00:17 UTC

This package is auto-updated.

Last update: 2024-09-18 19:09:20 UTC


README

MIT License Current Release Contributors Packagist Downloads Issues Patreon

描述

imagecolorallocatefromstring 是一个函数,可以根据字符串为您的 PHP GD 图像分配颜色。

Patreon - Become a Patron

imagecolorallocatefromstring 是一个 agjgd 项目。

用法

使用 Composer

本项目支持 Composer 依赖管理器。您可以在 packagist.org 上找到 imagecolorallocatefromstring 包。

使用 Composer 安装

运行以下命令之一

composer require andrewgjohnson/imagecolorallocatefromstring

或者将其添加到 composer.json 文件的 require 部分

"andrewgjohnson/imagecolorallocatefromstring": "1.*"

不使用 Composer

要使用而不使用 Composer,请在 imagecolorallocatefromstring.php 源文件 中添加一个 include

include_once 'source/imagecolorallocatefromstring.php';

示例

// standard method to allocate a color for an image
$red = imagecolorallocate($im, 0xFF, 0x00, 0x00);

// these will all allocate the same color as the method above
$alsoRed = imagecolorallocatefromstring($im, '#FF0000');
$alsoRed = imagecolorallocatefromstring($im, '#Ff0000');
$alsoRed = imagecolorallocatefromstring($im, '#ff0000');
$alsoRed = imagecolorallocatefromstring($im, '#f00');
$alsoRed = imagecolorallocatefromstring($im, 'f00');

GitHub 仓库和 imagecolorallocatefromstring.agjgd.org 上包含了其他示例。

帮助请求

如果您需要帮助,请将任何问题发布在 GitHub 上的 讨论区

如果您发现了一个错误,请 在 GitHub 上创建一个问题。在提交问题时,请使用我们的 问题模板

贡献

如果您想贡献,请阅读我们的 贡献指南

您可以通过成为 patreon.com/agjopensource 上的 赞助者 来财务上支持 imagecolorallocatefromstring 和 其他 agjgd.org 项目

Patreon - Become a Patron

致谢

本项目由 Andrew G. Johnson (@andrewgjohnson) 创立。

贡献者完整列表

我们的 安全政策和程序 来自于 atomist/samples 项目。我们的 问题模板 来自于 tensorflow/tensorflow 项目。我们的 pull request 模板 来自于 stevemao/github-issue-templates 项目。照片 mountains 来自 Gabriel Garcia Marengo

变更日志

您可以在变更日志中找到所有显著的变更。