Fix histogram with frames with alpha

This commit is contained in:
2018-02-06 01:40:54 +00:00
parent 8ba512f4d0
commit ee5b07e558
+13 -1
View File
@@ -382,7 +382,19 @@ Void HistogramWidget::stopHistogramComputation()
Void HistogramWidget::updateData( PlaYUVerFrame* pcFrame, PlaYUVerFrame* pcFrameSelection ) Void HistogramWidget::updateData( PlaYUVerFrame* pcFrame, PlaYUVerFrame* pcFrameSelection )
{ {
d->imageBits = pcFrame->getBitsPel(); d->imageBits = pcFrame->getBitsPel();
d->imageColorSpace = pcFrame->getColorSpace(); switch( pcFrame->getColorSpace() )
{
case PlaYUVerPixel::COLOR_YUV:
case PlaYUVerPixel::COLOR_GRAY:
d->imageColorSpace = 0;
break;
case PlaYUVerPixel::COLOR_RGB:
case PlaYUVerPixel::COLOR_RGBA:
d->imageColorSpace = 0;
break;
default:
d->imageColorSpace = 0;
}
d->imageChannels = pcFrame->getNumberChannels(); d->imageChannels = pcFrame->getNumberChannels();
// We are deleting the histogram data, // We are deleting the histogram data,