GithubHelp home page GithubHelp logo

Comments (4)

avalanche123 avatar avalanche123 commented on May 13, 2024

For this kind of things, there will be effects api (think DrawerInterface),
which will define EffectInterface that each driver will implement.
The main goal of Imagine is to bring the different libraries PHP comes with
to a common interface,
so you would probably do something like the following when that API is
built:

return $image->effect()
    ->colorize($this->color);

On Thu, Mar 24, 2011 at 4:03 PM, hetsch <
[email protected]>wrote:

Hi,
first thing - thanks for that beautiful library. I really appreciate to
work with it.
There is one small question left for me:
If i try to make a FilterInterface to manipulate the color of an image like
this:

class Color implements FilterInterface
{
       private $color;

       public function __construct($value)
       {
               $ratio = max($value, 255);

               $this->color = new \Imagine\Image\Color('fff');
               $this->color->darken($value);
       }

       public function apply(ImageInterface $image)
       {
               return imagefilter($image->resource, IMG_FILTER_COLORIZE,
                       $this->color->getRed(),
                       $this->color->getGreen(),
                       $this->color->getBlue()
               );
       }
}

there is no way to get receive the resource of the image because it's a
private property. I also
haven't found a getter method. So might it make sense to create a getter,
or do I only have some heavy knots in my thoughts?

Thanks

Reply to this email directly or view it on GitHub:
#18

Bulat Shakirzyanov | Software Alchemist

a: *about.me/avalanche123
*e:
[email protected]

from imagine.

hetsch avatar hetsch commented on May 13, 2024

Nice! So when can we expect that kind of thing? Is it planed to release it in the next few days/weeks or do we have to wait longer? (only roughly...). But anyway - thanks for your response

from imagine.

avalanche123 avatar avalanche123 commented on May 13, 2024

next couple of weeks, thanks for using it!

On Thu, Mar 24, 2011 at 4:51 PM, hetsch <
[email protected]>wrote:

Nice! So when can we expect that kind of thing? Is it planed to release it
in the next few days/weeks or do we have to wait longer? (only roughly...).
But anyway - thanks for your response

Reply to this email directly or view it on GitHub:
#18 (comment)

Bulat Shakirzyanov | Software Alchemist

a: *about.me/avalanche123
*e:
[email protected]

from imagine.

hetsch avatar hetsch commented on May 13, 2024

Great!

from 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.