Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not crop #32

Open
wblbird opened this issue Jul 13, 2017 · 13 comments
Open

can not crop #32

wblbird opened this issue Jul 13, 2017 · 13 comments

Comments

@wblbird
Copy link

wblbird commented Jul 13, 2017

all config follow on README.md
it works well ,can upload image ,can delete image
when I corp a image ,it alert “Error: item is not cropped”

@noam148
Copy link
Owner

noam148 commented Jul 13, 2017

Can you show me your ajax request response? When the crop apply the code send a ajax request with the position and sizes. With that data php cropped the image. But its possible that php hasn't got enough memory and than the code crashed.

If it crashe php return error in the ajax request. Can you show me the response?

@wblbird
Copy link
Author

wblbird commented Jul 14, 2017

5968e9a84db70: POST http://127.0.0.1/index.php?r=imagemanager%2Fmanager/crop at 2017-07-14 03:56:24 pm by 127.0.0.1

CropData
[
'x' => '75.5086956521739'
'y' => '33.93260869565217'
'width' => '456'
'height' => '378.3999999999999'
'rotate' => '0'
'scaleX' => '1'
'scaleY' => '1'
]

@noam148
Copy link
Owner

noam148 commented Jul 14, 2017

Thanks for the post data, but can you give me also the response data?

@wblbird
Copy link
Author

wblbird commented Jul 15, 2017

596a19468b51d: POST http://127.0.0.1/index.php?r=imagemanager%2Fmanager/crop at 2017-07-15 01:31:50 pm by 127.0.0.1

Response Headers

Name Value
X-Powered-By 'PHP/7.0.12'
Content-Type 'application/json; charset=UTF-8'
X-Debug-Tag '596a19468b51d'
X-Debug-Duration '136'
X-Debug-Link '/index.php?r=debug%2Fdefault%2Fview&tag=596a19468b51d'

@wblbird
Copy link
Author

wblbird commented Jul 15, 2017

596a19406d72e: POST http://127.0.0.1/index.php?r=imagemanager%2Fmanager/get-original-image at 2017-07-15 01:31:44 pm by 127.0.0.1

Response Headers

Name Value
X-Powered-By 'PHP/7.0.12'
Content-Type 'application/json; charset=UTF-8'
X-Debug-Tag '596a19406d72e'
X-Debug-Duration '159'
X-Debug-Link '/index.php?r=debug%2Fdefault%2Fview&tag=596a19406d72e'

@wblbird
Copy link
Author

wblbird commented Jul 15, 2017

596a193d56365: POST http://127.0.0.1/index.php?r=imagemanager%2Fmanager/view at 2017-07-15 01:31:41 pm by 127.0.0.1

Name Value
Content Type 'application/x-www-form-urlencoded; charset=UTF-8'
Raw 'ImageManager_id=10&_csrf=70K70ZUQonWVuptthuLHECj6vc3KqYDMiyACrEWsPF90BEk4NP1FvwZc5DalBnj0CKp3cuqVHj_L2EfH58CZ_g%3D%3D'
Decoded to Params [ 'ImageManager_id' => '10' '_csrf' => '70K70ZUQonWVuptthuLHECj6vc3KqYDMiyACrEWsPF90BEk4NP1FvwZc5DalBnj0CKp3cuqVHj_L2EfH58CZ_g==' ]

@noam148
Copy link
Owner

noam148 commented Jul 18, 2017

Sorry if im not clear, but I need the response of the crop request. See below:
response

@wblbird
Copy link
Author

wblbird commented Jul 19, 2017

{"name":"Exception","message":"Class 'Imagine\Image\Palette\RGB' not found","code":0,"type":"Error"
,"file":"D:\qampp_app\htdocs\vendor\noam148\yii2-image-manager\controllers\ManagerController.php"
,"line":296,"stack-trace":["#0 [internal function]: noam148\imagemanager\controllers\ManagerController-

actionCrop()","#1 D:\qampp_app\htdocs\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array
(Array, Array)","#2 D:\qampp_app\htdocs\vendor\yiisoft\yii2\base\Controller.php(156): yii\base
\InlineAction->runWithParams(Array)","#3 D:\qampp_app\htdocs\vendor\yiisoft\yii2\base\Module
.php(523): yii\base\Controller->runAction('crop', Array)","#4 D:\qampp_app\htdocs\vendor\yiisoft
\yii2\web\Application.php(102): yii\base\Module->runAction('imagemanager/ma...', Array)","#5 D:
\qampp_app\htdocs\vendor\yiisoft\yii2\base\Application.php(380): yii\web\Application->handleRequest
(Object(yii\web\Request))","#6 D:\qampp_app\htdocs\web\index.php(12): yii\base\Application->run
()","#7 {main}"]}

@wblbird
Copy link
Author

wblbird commented Jul 19, 2017

POST http://127.0.0.1/index.php?r=imagemanager%2Fmanager/crop | 500 Internal Server Error |   | 189ms

@noam148
Copy link
Owner

noam148 commented Jul 19, 2017

Thats what i need! Do you use a specific version of Imagine in your composer file? I looks like Imagine\Image\Palette\RGB not exists in the version that you used.

@wblbird
Copy link
Author

wblbird commented Jul 20, 2017

Thank you for your reply。let me check it,and version of Imagine is 0.5.0

@noam148
Copy link
Owner

noam148 commented Jul 20, 2017

Try to update it to 0.6.3

That the version I used.

@maz0717
Copy link

maz0717 commented Feb 20, 2018

I'm getting the same crash. With the same error. I think a dependency in the image manager composer file should be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants