Giter Site home page Giter Site logo

Comments (4)

SmileyChris avatar SmileyChris commented on August 18, 2024

I guess that'd be ok... or alternatively, perhaps the ThumbnailFile should be built with knowledge of the options it was generated with, allowing for a filter with no required options.

from easy-thumbnails.

sorl avatar sorl commented on August 18, 2024

I just want to comment on my design decision to make it a filter. First of all I think im.margin is ugly, is that really an explicit attribute for an image abstraction? Having the image abstraction to know of its requested size as well as the actual size also leads to some ugly coupling. As a filter you get one downside if you must and that is to have to set the size for the bounding box. The pros are:

  1. Its doesn't clutter the image abstraction.
  2. The filter is not tied to a thumbnail, it could be any image.
  3. You can have more margin than just the minumum.

from easy-thumbnails.

SmileyChris avatar SmileyChris commented on August 18, 2024

Yep, i'm not sold on im.margin, but I think giving the ThumbnailFile information so that you could optionally use the filter without an argument would be a fair enough use-case.

Thanks for your comments, sorl.

from easy-thumbnails.

hvdklauw avatar hvdklauw commented on August 18, 2024

I can certainly live with that solution. Less duplication = more power to us

from easy-thumbnails.

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.