返回排行榜

https://spatie.be/docs/image/v3/introduction

imagephpimagickgd
Star 增长趋势
Star
1.4k
Forks
139
周增长
Issues
0
5001k
2023年1月2024年3月2025年5月2026年7月
制品库Packagistcomposer require spatie/image
README
Logo for image

Manipulate images with an expressive API

Latest Version on Packagist MIT Licensed GitHub Workflow Status Total Downloads

Image manipulation doesn't have to be hard. Here are a few examples on how this package makes it very easy to manipulate images.

use Spatie\Image\Image;

// modifying the image so it fits in a 100x100 rectangle without altering aspect ratio
Image::load($pathToImage)
   ->width(100)
   ->height(100)
   ->save($pathToNewImage);
   
// overwriting the original image with a greyscale version   
Image::load($pathToImage)
   ->greyscale()
   ->save();
   
// make image darker and save it in low quality
Image::load($pathToImage)
   ->brightness(-30)
   ->quality(25)
   ->save();
   
// rotate the image and sharpen it
Image::load($pathToImage)
   ->orientation(90)
   ->sharpen(15)
   ->save();

You'll find more examples in the full documentation.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

composer require spatie/image

Please note that since version 1.5.3 this package requires exif extension to be enabled: http://php.net/manual/en/exif.installation.php

Usage

Head over to the full documentation.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Testing

npm i pixelmatch
composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker.

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

We publish all received postcards on our company website.

Credits

Large parts of this codebase were copied from Intervention Image by Oliver Vogel, and modified for readability and to fit our needs.

License

The MIT License (MIT). Please see License File for more information.

相关仓库
upscayl/upscayl

🆙 Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.

TypeScriptnpmGNU Affero General Public License v3.0aiesrgan
upscayl.org
47.4k2.4k
lovell/sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.

JavaScriptnpmApache License 2.0javascriptwebp
sharp.pixelplumbing.com
32.5k1.4k
Molunerfinn/PicGo

:rocket: The Ultimate Image Uploader for Efficient Creators. Supports Obsidian, Typora, VS Code etc. and 60+ image hosting services (S3, GitHub, Cloudflare R2, Imgur, Aliyun OSS...). Paste, upload, done.

TypeScriptnpmMIT Licenseelectronelectron-app
picgo.app
26.9k2.3k
SDWebImage/SDWebImage

Asynchronous image downloader with cache support as a UIImageView category

Objective-CMIT Licensemacosios
sdwebimage.github.io
25.6k6k
dimsemenov/PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent

JavaScriptnpmMIT Licensegallerylightbox
photoswipe.com
25.2k3.3k
onevcat/Kingfisher

A lightweight, pure-Swift library for downloading and caching images from the web.

SwiftMIT Licenseswiftkingfisher
24.4k2.8k
Intervention/image

PHP Image Processing

PHPPackagistMIT Licensephpimage
image.intervention.io
14.4k1.5k
python-pillow/Pillow

Python Imaging Library (fork)

PythonPyPIOtherccross-platform
python-pillow.github.io
13.7k2.5k
vercel/satori

Enlightened library to convert HTML and CSS to SVG

TypeScriptnpmMozilla Public License 2.0image-generatorjsx
og-playground.vercel.app
13.7k356
Yalantis/uCrop

Image Cropping Library for Android

JavaMavenandroidjava
yalantis.com/blog/introducing-ucrop-our-own-image-cropping-library-for-android/
12.1k2.2k
imgproxy/imgproxy

Fast and secure standalone server for resizing, processing, and converting images on the fly

GoGo ModulesApache License 2.0imageresize-images
imgproxy.net
11k758
tsayen/dom-to-image

Generates an image from a DOM node using HTML5 canvas

JavaScriptnpmOthercanvashtml
10.8k1.7k