timedoor/image-processing

Laravel 图像处理模块

v0.0.1 2022-04-26 02:49 UTC

This package is auto-updated.

Last update: 2024-09-12 12:46:42 UTC


README

Latest Stable Version Total Downloads License

image-processing

在上传到服务器之前,处理图像的裁剪或缩放。

安装

  1. 转到项目目录
  2. 运行 composer require timedoor/image-processing --dev
  3. 运行 php artisan imgproc:install
  4. 选择要安装的模块
  5. 资源资产和组件将被转移到您的项目中
  6. 要实现此库,请参考以下用法。

用法

  1. <x-imgproc-inputfile> 组件添加到您的表单中 示例
    ...
     <div class="form-group">
         <label for="photo"></label>
         <x-imgproc-inputfile class="additional-input-class" name="photo"></x-imgproc-inputfile>
     </div>
     ...
  2. 然后在页脚部分上方添加 <x-imgproc-modal> 组件 示例
    ...
    <x-imgproc-modal title="Image Processing" :mode_cropper="true" :mode_resize="true"></x-imgproc-modal>
    ...
  3. 您可以使用标签 :mode_cropper="(boolean)":mode_resize="(boolean)" 设置裁剪或缩放图像的模式
  4. 完成!现在您可以继续了。

贡献

contributions-wellcome

欢迎贡献!

许可证

在MIT许可证下许可,有关更多信息,请参阅 LICENSE