Skip to content

Commit

Permalink
Add image_width and image_height to env
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecraank committed Mar 15, 2024
1 parent 1f26c3d commit 2022af4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

IMAGE_WIDTH=1920
IMAGE_HEIGHT=1080

SSO_ENABLED=false
SSO_HTTP_HEADER_USER_KEY=HTTP_AUTH_USER
SSO_BYPASS_DOMAIN_VERIFICATION=false
Expand Down
3 changes: 3 additions & 0 deletions .env.example.productive
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

IMAGE_WIDTH=1920
IMAGE_HEIGHT=1080

SSO_ENABLED=false
SSO_HTTP_HEADER_USER_KEY=HTTP_AUTH_USER
SSO_BYPASS_DOMAIN_VERIFICATION=false
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/PresentationProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function processPdfPageToImage($pdf, $page, $pres_id, $imagename) {
$image->setImageCompressionQuality(100);

// Resize
$image->resizeImage(1920, 1080, Imagick::FILTER_LANCZOS, 1);
$image->resizeImage(config('app.image_width'), config('app.image_height'), Imagick::FILTER_LANCZOS, 1);

$image->writeImage(public_path('data/presentations/' . $pres_id . '/' . $imagename));

Expand Down
2 changes: 2 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
'placeholder_image' => 'https://placehold.co/600x338?text=Assign\nTemplate',

'name' => env('APP_NAME', 'MIS Manager'),
'image_width' => env('IMAGE_WIDTH', 1920),
'image_height' => env('IMAGE_HEIGHT', 1080),

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 2022af4

Please sign in to comment.