Ejemplo n.º 1
0
void BCGContainer::writeToFilterAction(FilterAction& action, const QString& prefix) const
{
    action.addParameter(prefix + "channel",    channel);
    action.addParameter(prefix + "brightness", brightness);
    action.addParameter(prefix + "contrast",   contrast);
    action.addParameter(prefix + "gamma",      gamma);
}
Ejemplo n.º 2
0
void WBContainer::writeToFilterAction(FilterAction& action, const QString& prefix) const
{
    action.addParameter(prefix + "black", black);
    action.addParameter(prefix + "exposition", exposition);
    action.addParameter(prefix + "temperature", temperature);
    action.addParameter(prefix + "green", green);
    action.addParameter(prefix + "dark", dark);
    action.addParameter(prefix + "gamma", gamma);
    action.addParameter(prefix + "saturation", saturation);
}
Ejemplo n.º 3
0
void RedEyeCorrectionContainer::writeToFilterAction(FilterAction& action, const QString& prefix) const
{
    action.addParameter(prefix + QLatin1String("redtoavgratio"), m_redToAvgRatio);
}
Ejemplo n.º 4
0
FilterAction DImgBuiltinFilter::filterAction() const
{
    FilterAction action;

    switch (m_type)
    {
        case NoOperation:
        default:
            return action;

        case Rotate90:
        case Rotate180:
        case Rotate270:
        {
            action = FilterAction("transform:rotate", 1);
            int angle;

            if (m_type == Rotate90)
            {
                angle = 90;
            }
            else if (m_type == Rotate180)
            {
                angle = 180;
            }
            else
            {
                angle = 270;
            }

            action.addParameter("angle", angle);
            break;
        }

        case FlipHorizontally:
        case FlipVertically:
        {
            action = FilterAction("transform:flip", 1);
            action.addParameter("direction", m_type == FlipHorizontally ? "horizontal" : "vertical");
            break;
        }

        case Crop:
        {
            action  = FilterAction("transform:crop", 1);
            QRect r = m_arg.toRect();
            action.addParameter("x",      r.x());
            action.addParameter("y",      r.y());
            action.addParameter("width",  r.width());
            action.addParameter("height", r.height());
            break;
        }

        case Resize:
        {
            action  = FilterAction("transform:resize", 1);
            QSize s = m_arg.toSize();
            action.addParameter("width",  s.width());
            action.addParameter("height", s.height());
            break;
        }

        case ConvertTo8Bit:
        case ConvertTo16Bit:
        {
            action = FilterAction("transform:convertDepth", 1);
            action.addParameter("depth", m_type == ConvertTo8Bit ? 8 : 16);
            break;
        }
    }

    action.setDisplayableName(displayableName());
    return action;
}