定制 doubleplus/imagepig 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

doubleplus/imagepig

最新稳定版本:1.0.8

Composer 安装命令:

composer require doubleplus/imagepig

包简介

A composer library for Image Pig, the API for AI images.

README 文档

README

PHP package for Image Pig, the API for AI images.

Installation

composer require doubleplus/imagepig

Example of usage

use ImagePig\ImagePig;

# create instance of API (put here your actual API key)
$imagepig = ImagePig('your-api-key');

# call the API with a prompt to generate an image
$result = $imagepig->xl('cute piglet running on a green garden');

# save image to a file
$result->save('cute-piglet.jpeg');

# or access image data (binary string)
$result->data;

# or access image as a GDImage object (needs to have the GD extension installed)
$result->image

Contact us

Something does not work as expected? Feel free to send us a message, we are here for you.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-14