Jump to content

Recommended Posts

Posted

Hi,
 
Recently i came across a strange behaviour of core image cropping function. My Core version is Dev 2.6.17, OpenServer (Apache 2.4, PHP 5.4 and PHP 5.6)
 
I have an image like that:
post-2505-0-32806200-1442435937_thumb.jp

And when i try to crop it with that code:

for($i=0;$i<=9;$i++)
{
    $img = wire('pages')->get(1850)->page_header_images->eq(1)->crop(0, $i*80, 1280, 80); // crop($x, $y, $w, $h)
    echo "<img src=\"{$img->url}\"><br/><br/>";
}

I get always get the same peaces of picture though it has different $y

post-2505-0-02920300-1442436278_thumb.jp

I also have a problem when i use resize/crop interface in modal window in page editor.

I wanted to post n issue to github, but would like to ask you to check if you can reproduce this behavior 

Posted

Sorry guys, that was environmental problem, may be with image library. I did not find out true reason, but on my laptop the problem is not reproducable: crop works correctly.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...