Giter VIP home page Giter VIP logo

Comments (7)

mludvik avatar mludvik commented on May 27, 2024 2

I got into same issue. If I remove this conditional block, it works as expected for me (because upscaling is handled few lines below here). Do you think this is proper solution? If so, just let me know and I can prepare pull request. Thanks.

from yii2-imagine.

cuiyun97 avatar cuiyun97 commented on May 27, 2024 2

Exception 'Imagine\Exception\RuntimeException' with message 'Unable to open image /cyzz/temp/liao-wx/web/uploads/book/20200823/c826fd60112b70dbf5f19bdca3bc4ede.jpg'

in /cyzz/temp/liao-wx/vendor/imagine/imagine/src/Gd/Imagine.php:95

from yii2-imagine.

Demak avatar Demak commented on May 27, 2024

It seems like by design image will not be upscaled, but in documentation there is a misleading sentence:

If both dimensions are specified, resulting thumbnail would be exactly the width and height specified. How it's achieved depends on the mode.

which implies that image of any size will be always resized/cropped to fit specified sizes.

from yii2-imagine.

mgerasimchuk avatar mgerasimchuk commented on May 27, 2024

So sad about abandoned PR #33
((

Any news about fixes of this issue?

from yii2-imagine.

samdark avatar samdark commented on May 27, 2024

Any news about fixes of this issue?

No, more pressing matters too my time. If you have time you can prepare a pull request taking comments left there into account. I'll review/merge it.

from yii2-imagine.

yuniorsk avatar yuniorsk commented on May 27, 2024

There's new flag ImageInterface::THUMBNAIL_FLAG_UPSCALE in Imagine since version 1.0.0 but it was introduces as a breaking change see here

BREAKING CHANGE the $mode argument has been renamed to $settings, and it's now an integer (but old string values are accepted for backward compatibility). In this case the ManipulatorInterface constants THUMBNAIL_INSET, THUMBNAIL_OUTBOUND were changed from string values to integers.

Problem is this was not reflected in this codebase and this line could cause problems

if ($mode == ManipulatorInterface::THUMBNAIL_OUTBOUND) {

I can make PR, but that would require dropping support for older versions of Imagine.

What do you think?

from yii2-imagine.

samdark avatar samdark commented on May 27, 2024

There are no outstanding issues with current version so I think we can release 2.3.0 or even 3.0.0 with some breaking changes.

from yii2-imagine.

Related Issues (20)

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.