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

Work whis resize image #1

Open
antonypp opened this issue Nov 8, 2011 · 0 comments
Open

Work whis resize image #1

antonypp opened this issue Nov 8, 2011 · 0 comments

Comments

@antonypp
Copy link

antonypp commented Nov 8, 2011

if i want crop image resaze by tag style="width=200px", and oridginal image width is 800. Crop not work, because I shod use ratio
example:
$size = getimagesize($image);
$ratio = $size[0]/$jcropper->targ_w;
$coords = $jcropper->getCoordsFromPost('imageId', $ratio);

public function getCoordsFromPost($attribute,$ratio=1)
{
$coords = array('x' => null, 'y' => null, 'h' => null, 'w' => null);
foreach ($coords as $key => $value) {
$coords[$key] = r a t i o POST[$attribute . '' . $key];
}
return $coords;
}

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

1 participant