Skip to content
Snippets Groups Projects
Commit 6fa6bf8e authored by Provot Bertrand's avatar Provot Bertrand
Browse files

disable split hsv on grayscale and binary images

parent 4e972594
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@
#include "SplitHsvOp.h"
#include "../Tools.h"
#include <QMessageBox>
using namespace std;
using namespace imagein;
......@@ -36,6 +37,12 @@ SplitHsvOp::SplitHsvOp() : Operation(qApp->translate("Operations", "Split HSV pl
void SplitHsvOp:: operator()(const imagein::Image* image, const std::map<const imagein::Image*, std::string>&) {
if(image->getNbChannels()==1){
QMessageBox::warning(NULL, qApp->translate("Operations", "The operation cannot be applied on this image"),
qApp->translate("Operations", "The image is not in color."));
return;
}
int width = image->getWidth();
int height = image->getHeight();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment