mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
add image canvas and resize in settings
This commit is contained in:
parent
914cd7770b
commit
12ea62fd0e
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'imageCanvasW' => [
|
||||
'type' => 'anomaly.field_type.integer',
|
||||
'config' => [
|
||||
'default_value' => 800,
|
||||
],
|
||||
],
|
||||
'imageCanvasH' => [
|
||||
'type' => 'anomaly.field_type.integer',
|
||||
'config' => [
|
||||
'default_value' => 600,
|
||||
],
|
||||
],
|
||||
|
||||
'imageResizeW' => [
|
||||
'type' => 'anomaly.field_type.integer',
|
||||
'config' => [
|
||||
'default_value' => null,
|
||||
],
|
||||
],
|
||||
'imageResizeH' => [
|
||||
'type' => 'anomaly.field_type.integer',
|
||||
'config' => [
|
||||
'default_value' => 600,
|
||||
],
|
||||
],
|
||||
];
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'title' => 'Files',
|
||||
'title' => 'Media Field Type',
|
||||
'name' => 'Files Field Type',
|
||||
'description' => 'A multiple files upload field type.',
|
||||
];
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'imageCanvasW' => [
|
||||
'name' => 'Image Canvas Width'
|
||||
],
|
||||
'imageCanvasH' => [
|
||||
'name' => 'Image Canvas Height'
|
||||
],
|
||||
'imageResizeW' => [
|
||||
'name' => 'Image Resize Width'
|
||||
],
|
||||
'imageResizeH' => [
|
||||
'name' => 'Image Resize Height'
|
||||
],
|
||||
];
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'title' => 'Dosyalar',
|
||||
'title' => 'Media Field Type',
|
||||
'name' => 'Dosya Alanı Tipi',
|
||||
'description' => 'Birden fazla dosya yükleme alanı türü.',
|
||||
];
|
||||
|
||||
@ -61,8 +61,8 @@ class UploadController extends AdminController
|
||||
$position = $settings->value('visiosoft.module.advs::watermark_position');
|
||||
|
||||
$img = WaterMark::make($this->request->file('upload')->getRealPath())
|
||||
->resize(null, 600)
|
||||
->resizeCanvas(800, 600, 'center', false, 'fff');
|
||||
->resize(setting_value('visiosoft.field_type.media::setting.imageResizeW', null), setting_value('visiosoft.field_type.media::setting.imageResizeH', 600))
|
||||
->resizeCanvas(setting_value('visiosoft.field_type.media::setting.imageCanvasW', 800), setting_value('visiosoft.field_type.media::setting.imageCanvasH', 600), 'center', false, 'fff');
|
||||
if ($watermarktype == 'image') {
|
||||
|
||||
$watermarkimage_id = $settings->value('visiosoft.module.advs::watermark_image');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user