pixelcrab/png-chunks 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

pixelcrab/png-chunks

最新稳定版本:1.0.1

Composer 安装命令:

composer require pixelcrab/png-chunks

包简介

Simple PHP class to handle(get, add, remove) PNG chunks.

README 文档

README

Get, add or remove chunks to PNG. This class is more a personal helper for other projects but could be nice for others too. Feel free to extend the code with new features.

Installation

With composer

composer require pixelcrab/png-chunks

With source

Download the source code from releases or the file PngChunks.php directly from the repository. Include the file in your project and start using it.

Usage

<?php
// Use namespace
use PHPPNG\PNGChunks\PNGChunks;

// Initialize class. Param is a valid PNG file.
$png = new PngChunk(__DIR__ . '/image.png');

// Fetch all tEXt chunks
$chunks = $png->getChunks('tEXt');

// Remove all tEXt chunks
$png->removeChunks('tEXt');

// Add new tEXt chunk
$png->addChunk('tEXt', 'custom', 'my value');

// Some methods are chainable
$png
  ->removeChunks('tEXt')
  ->addChunk('tEXt', 'custom', 'my value');

Want spend me some BTC, ETC or BTH

  • Bitcoin (BTC): 19FXuMSR1yoApqZ9VkY1e8bhxHp4fqK4ZB
  • Ether (ETC): 0x45dAC2c1647B505Dc3a4E48FAa3443bbEAf6eBF2
  • Bitcoin Cash (BTH): qpdgpgp78r5ql8c9tjtkc4ex82s09hc4a5tsralx4g

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-13