Code Monkey home page Code Monkey logo

Comments (7)

burzum avatar burzum commented on May 18, 2024

There is an unit test for this feature.

https://github.com/burzum/cakephp-imagine-plugin/blob/master/tests/TestCase/Model/Behavior/ImagineBehaviorTest.php#L149

You can even disable the cleanup and check the generated image if the size is correct. Are there any errors or something else shown? Or is it just not creating the correct size?

from cakephp-imagine-plugin.

burzum avatar burzum commented on May 18, 2024

OK, I can confirm it's an issue which I thought I have resolved.

See php-imagine/Imagine#478 this as well, their support is terrible slow.

from cakephp-imagine-plugin.

GuidoHendriks avatar GuidoHendriks commented on May 18, 2024

But this doesn't seem to be a Imagine problem. The same version of it is used, only the version of this plugin is changed.

from cakephp-imagine-plugin.

burzum avatar burzum commented on May 18, 2024

I'm more than happy if you can provide a better idea. I think it has something to do with the way the instance is passed around in the ImageProcessor lib vs the Behavior before.

Also, like I write in the ticket, this even happens with their very own tutorial code. Also I had do do the & reference in the old behavior to make this work for some weird reason. I'm pretty sure there is something wrong going on with the instance.

from cakephp-imagine-plugin.

burzum avatar burzum commented on May 18, 2024

The issue is really weird, the unit tests for it work just fine. I've checked even the generated images manually if the size is really what I expect and it is correct.

from cakephp-imagine-plugin.

burzum avatar burzum commented on May 18, 2024

@GuidoHendriks I can't do much about this I think.

See https://github.com/avalanche123/Imagine/blob/develop/lib/Imagine/Image/AbstractImage.php#L42

        // Won't work
        $thumbnail = $this->copy();
        // Works
        $thumbnail = $this;

Honestly, I have no idea why this was working before, nor why the copy is required here because it's not working when using copy().

from cakephp-imagine-plugin.

burzum avatar burzum commented on May 18, 2024

@GuidoHendriks please try the 2.x branch, this commit d21f2e9, should fix the problem. It is still a workaround but I doubt Imagine is going to fix it any time soon. I still don't even understand the exact cause of the issue.

from cakephp-imagine-plugin.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.