ranjeet968/ixlcompression
最新稳定版本:v1.0.13
Composer 安装命令:
composer require ranjeet968/ixlcompression
包简介
A Laravel package for compressing images (JPG, JPEG, PNG, GIF, BMP, WEBP, PSD, TIFF), PDFs (Snappy, Dompdf, or standard PDF), and videos (MP4, MOV, AVI, MKV, WEBM, FLV) using Imagick, Ghostscript, and FFmpeg.
关键字:
README 文档
README
IxlCompression is a Laravel package that compresses images and PDFs before storing them. It supports Imagick, Ghostscript, Snappy, and Dompdf for optimized compression.
🚀 Installation
Install the package using Composer:
composer require ranjeet968/ixlcompression If you face dependency issues, try updating: composer update ranjeet968/ixlcompression 📂 Supported File Types ✅ Compressed Files 📄 PDFs (Compressed using Ghostscript with configurable pdf_quality setting) 🖼️ Images (jpg, jpeg, png, gif, bmp, webp, psd, tiff - Compressed using Imagick with configurable image_quality setting) 🎞️ Videos (mp4, mov, avi, mkv, webm, flv - Compressed using FFmpeg with configurable CRF setting) ⛔ Unsupported Files doc, xls, ppt, csv (No compression applied) 🔧 Usage 1️⃣ Basic File Compression use Ranjeet\IxlCompression\FileCompressor; $compressedFile = FileCompressor::compress($uploadedFile); Here, $uploadedFile should be an instance of Illuminate\Http\UploadedFile or a valid file path. 🛠 Requirements PHP 8.0+ Laravel 8+ Imagick (for image compression) Ghostscript (for PDF compression) FFmpeg (for video compression) Snappy/Dompdf (optional PDF compression) To install required dependencies: For image support: a. example for php 8.2 : sudo apt install php8.2-imagick -y For PDF compression: b. sudo apt install ghostscript -y For Video compression: c. sudo apt install ffmpeg php8.2-ffmpeg -y ## License This package is proprietary and not open source. You may not copy, reuse, or distribute this code without written permission.
统计信息
- 总下载量: 43
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2025-04-04