yii2-image-manager icon indicating copy to clipboard operation
yii2-image-manager copied to clipboard

can not crop

Open wblbird opened this issue 7 years ago • 13 comments

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”

wblbird avatar Jul 13 '17 08:07 wblbird

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?

noam148 avatar Jul 13 '17 08:07 noam148

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' ]

wblbird avatar Jul 14 '17 16:07 wblbird

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

noam148 avatar Jul 14 '17 17:07 noam148

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 avatar Jul 15 '17 13:07 wblbird

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 avatar Jul 15 '17 13:07 wblbird

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==' ]

wblbird avatar Jul 15 '17 13:07 wblbird

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

noam148 avatar Jul 18 '17 20:07 noam148

{"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 avatar Jul 19 '17 13:07 wblbird

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

wblbird avatar Jul 19 '17 13:07 wblbird

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.

noam148 avatar Jul 19 '17 14:07 noam148

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

wblbird avatar Jul 20 '17 14:07 wblbird

Try to update it to 0.6.3

That the version I used.

noam148 avatar Jul 20 '17 14:07 noam148

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

maz0717 avatar Feb 20 '18 02:02 maz0717