# Path: sigal/signals.py



import logging
from pilkit.processors import Adjust
from sigal import signals

Based on pilkit's Adjust_ processor.

.. _Adjust: \
   https://github.com/matthewwithanm/pilkit/blob/master/pilkit/processors/base.py#L19

Settings::

    adjust_options = {
        'color': 1.0,
        'brightness': 1.0,
        'contrast': 1.0,
        'sharpness': 1.0
    }

"""




logger = logging.getLogger(__name__)


def adjust(img, settings=None):
    logger.debug('Adjust image %r', img)
    return Adjust(**settings['adjust_options']).process(img)


def register(settings):
    if settings.get('adjust_options'):

# Path: sigal/signals.py



# Path: sigal/plugins/adjust.py
import logging
from pilkit.processors import Adjust
from sigal import signals


Based on pilkit's Adjust_ processor.

.. _Adjust: \
   https://github.com/matthewwithanm/pilkit/blob/master/pilkit/processors/base.py#L19

Settings::

    adjust_options = {
        'color': 1.0,
        'brightness': 1.0,
        'contrast': 1.0,
        'sharpness': 1.0
    }

"""




logger = logging.getLogger(__name__)


def adjust(img, settings=None):
    logger.debug('Adjust image %r', img)
    return Adjust(**settings['adjust_options']).process(img)


def register(settings):
    if settings.get('adjust_options'):

        signals.img_resized.connect(adjust)