提交 a37a6bd7 编写于 作者: P Pavel Rojtberg

fix BGR <> RGB swap

we are drawing on a BGR image declared as RGB, so we should not swap
components here either.
上级 8cc09f17
......@@ -843,7 +843,7 @@ void GuiReceiver::putText(void* arr, QString text, QPoint org, void* arg2)
//cvScalar(blue_component, green_component, red_component[, alpha_component])
//Qt map non-transparent to 0xFF and transparent to 0
//OpenCV scalar is the reverse, so 255-font->color.val[3]
qp.setPen(QColor(font->color.val[2], font->color.val[1], font->color.val[0], 255 - font->color.val[3]));
qp.setPen(QColor(font->color.val[0], font->color.val[1], font->color.val[2], 255 - font->color.val[3]));
qp.setFont(f);
}
qp.drawText(org, text);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册