-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
corp logic fix and enhancement (#28)
* crop fix attempt 1 * crop fix attempt 2 with echo * crop fix attempt 3 * crop fix attempt 4 * crop fix attempt 5 - with ceneter commands * crop fix attempt 6 - with debug info * crop fix attempt 7 - with debug info * crop fix attempt 8 * crop fix attempt 9 * crop fix attempt 10 * crop fix cleanup * added fill command and changed crop and rest of the refactor * crop & fill: fixed missing h or w * Update prod build npm Co-authored-by: Ralph Schindler <[email protected]>
- Loading branch information
1 parent
dac26ce
commit 79706ba
Showing
15 changed files
with
14,199 additions
and
1,443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ composer.lock | |
.idea/ | ||
/node_modules | ||
.phpunit.result.cache | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,6 +124,8 @@ | |
'quality', | ||
'fit', | ||
'grayscale', | ||
'crop', | ||
'fill' | ||
] | ||
] | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,8 @@ public function run() | |
public function user() | ||
{ | ||
DB::table('users')->insert([ | ||
'name' => 'Developer', | ||
'email' => '[email protected]', | ||
'name' => 'Developer', | ||
'email' => '[email protected]', | ||
'password' => bcrypt('password') | ||
]); | ||
} | ||
|
@@ -44,6 +44,24 @@ public function singleImageExamples() | |
$model->save(); | ||
}); | ||
|
||
tap(new SingleImageExample, function ($model) { | ||
$model->name = 'Croppable Image JPG Original 1600x1067'; | ||
$model->variations = [ | ||
'Crop 100x100, gravity south-west' => 'crop_100x100|gravity_south_west', | ||
'Crop 300x300, gravity auto - means center' => 'crop_300x300|gravity_auto', | ||
'Crop 300x300, gravity auto - means center by default' => 'crop_300x300', | ||
// missing params example | ||
'Fill 500x100, gravity auto' => 'fill|size_500x100', | ||
'Fill 500x100, gravity north-west (west is ignored due to requested aspect ratio)' => 'fill|size_500x100|gravity_north_west', | ||
'Fill 500x100, gravity north-east (north is ignored due to requested aspect ratio)' => 'fill|size_100x500|gravity_north_east', | ||
// missing params example (for size) | ||
'Fill 100x100, gravity auto' => 'fill|size_100x100', | ||
'Fill 400x200, gravity auto' => 'fill|size_400x200', | ||
]; | ||
$model->image->setData(file_get_contents(resource_path('example-images/multiple-people-1600x1067.jpg'))); | ||
$model->save(); | ||
}); | ||
|
||
tap(new SingleImageExample, function ($model) { | ||
$model->name = 'Red Rectangle JPG Original 500x200'; | ||
$model->variations = [ | ||
|
@@ -63,7 +81,7 @@ public function singleImageExamples() | |
$model->variations = [ | ||
'no transformations' => '', | ||
'Grayscale' => 'grayscale', | ||
'Fit Scale Down to 200 pixels in width'=> 'fit_scale|size_200x', | ||
'Fit Scale Down to 200 pixels in width' => 'fit_scale|size_200x', | ||
'Fit Limit Pad Up to 800 pixels in width, extra space added has purple background' => 'fit_lpad|size_800x|bg_800080', | ||
'Fit Resize to 300x100, will skew image' => 'fit_resize|size_300x100', | ||
'Fit Limit to 600 in width, 300 in height - should not scale up' => 'fit_limit|size_600x300', | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.