Skip to content

Division by zero #3

@seltix5

Description

@seltix5

Hello,
For some images i'm getting the error "Division by zero" in xymak-smartcrop/smartcrop.php:449.

example image : https://ufile.io/764g9 ( 501x376 )

$dst_w = 300;
$dst_h = 225;

$smartcrop = new \xymak\image\smartcrop($file_img_resource, ['width' => $dst_w, 'height' => $dst_h]);
$res = $smartcrop->analyse();
$smartcrop->crop($res['topCrop']['x'], $res['topCrop']['y'], $res['topCrop']['width'], $res['topCrop']['height']);
RETURN $smartcrop->get()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions