Code Monkey home page Code Monkey logo

imagick's Introduction


/ | / | / |
$$$$$$/ _____ ____ ______ ______ $$/ _______ $$ | __ $$ | / / \ / \ / \ / | / |$$ | / | $$ | $$$$$$ $$$$ | $$$$$$ |/$$$$$$ |$$ |/$$$$$$$/ $$ |/$$/ $$ | $$ | $$ | $$ | / $$ |$$ | $$ |$$ |$$ | $$ $$<
$$ | $$ | $$ | $$ |/$$$$$$$ |$$ _
$$ |$$ |$$ _____ $$$$$$ \ / $$ |$$ | $$ | $$ |$$ $$ |$$ $$ |$$ |$$ |$$ | $$ | $$$$$$/ $$/ $$/ $$/ $$$$$$$/ $$$$$$$ |$$/ $$$$$$$/ $$/ $$/ / __$$ |
$$ $$/
$$$$$$/

Imagick Extension for SilverStripe

Requires a SilverStripe 3.* install and PHP Imagick configured for your PHP install.

On ubuntu, this was as easy as:

sudo apt-get install php5-imagick
sudo php5enmod imagick

followed by restarting apache.

Once it has been added, you will have access to the following additional Image functions:

  • BlurredImage($radius, $sigma)
    • Blurs an image using the Imagick::blurImage() function
    • @param $radius - The radius of the blur
    • @param $sigma - The standard deviation of the blur
  • ColourTransparentImage($colour)
    • Fully colours an image in a single colour, preserving any opacity
    • @param $colour - A colour string to give the image
  • ColourOverlayImage($colour, $opacity)
    • Overlays a colour on top of an image, with a varying degree of opacity
    • @param $colour - A colour string to give the image
    • How transparent the overlay should be, from 0.0 - fully transparent to 1.0 - a block colour

NOTE: Currently, the $colour parameter only supports strings being passed, eg. "red", "blue", "green" will work, but "#ff0000", "#00ff00" and "#0000ff" will not.

imagick's People

Contributors

sam-costigan avatar

Watchers

 avatar

Forkers

helpfulrobot

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.