cbColorspace->addItem(i18n("YCbCr CbCr plane"), QVariant(ColorPlaneExport::CPE_YPbPr));
cbColorspace->addItem(i18n("RGB plane, one component varying"), QVariant(ColorPlaneExport::CPE_RGB_CURVE));
cbColorspace->addItem(i18n("HSV Hue Shift"), QVariant(ColorPlaneExport::CPE_HSV_HUESHIFT));
+ cbColorspace->addItem(i18n("HSV Saturation"), QVariant(ColorPlaneExport::CPE_HSV_SATURATION));
sliderColor->setSliderPosition(128);
}
}
QImage img;
+ QColor col;
QSize size(QVariant(tResX->text()).toInt(), QVariant(tResY->text()).toInt());
switch (cbColorspace->itemData(cbColorspace->currentIndex()).toInt()) {
case CPE_YUV:
case CPE_HSV_HUESHIFT:
img = m_colorTools->hsvHueShiftPlane(size, sliderColor->value(), sliderScaling->value(), -180, 180);
break;
+ case CPE_HSV_SATURATION:
+ col.setHsv(0, 0, sliderColor->value());
+ img = m_colorTools->hsvCurvePlane(size, col, ColorTools::COM_H, ColorTools::COM_S);
+ break;
+ default:
+ Q_ASSERT(false);
}
img.save(kurlrequester->text());
}
lblSliderName->setText(i18n("HSV Saturation"));
lblScaling->setText(i18n("HSV Value"));
break;
+ case CPE_HSV_SATURATION:
+ enableSliderScaling(false);
+ enableSliderColor(true);
+ sliderColor->setRange(0, 255);
+ sliderColor->setValue(200);
+ lblSliderName->setText(i18n("HSV Value"));
+ break;
default:
enableSliderScaling(false);
enableSliderColor(false);