@@ -818,19 +818,19 @@ Task<shared_ptr<CanvasStatistics>> ImageCanvas::computeCanvasStatistics(
818818 }
819819
820820 const auto result = make_shared<CanvasStatistics>();
821- const size_t nColorChannels = alphaChannel ? (flattened.size () - 1 ) : flattened.size ();
821+ const auto nColorChannels = alphaChannel ? (flattened.size () - 1 ) : flattened.size ();
822822 result->nChannels = (int )nColorChannels;
823823
824824 result->histogramColors .resize (nColorChannels);
825825 for (size_t i = 0 ; i < nColorChannels; ++i) {
826826 string rgba[] = {" R" , " G" , " B" , " A" };
827- string colorName = nColorChannels == 1 ? " L" : rgba[std::min (i, ( size_t ) 3 )];
827+ string colorName = nColorChannels == 1 ? " L" : rgba[std::min (i, 3uz )];
828828 result->histogramColors [i] = Channel::color (colorName, false );
829829 }
830830
831831 const auto regionSize = region.size ();
832- const size_t numPixels = region.area ();
833- const size_t numSamples = nColorChannels * numPixels;
832+ const auto numPixels = region.area ();
833+ const auto numSamples = nColorChannels * numPixels;
834834
835835 // If we have 3 color channels, apply alpha, the inspection chroma, and transfer function
836836 if (nColorChannels >= 3 ) {
@@ -928,7 +928,7 @@ Task<shared_ptr<CanvasStatistics>> ImageCanvas::computeCanvasStatistics(
928928 result->minimum = stats.minimum;
929929
930930 // The more pixels we have, the finer we can make the histogram without becoming noisy
931- // const size_t numBins = clamp(numPixels / 512, (size_t)16, (size_t)512 );
931+ // const size_t numBins = clamp(numPixels / 512, 16uz, 512uz );
932932 const size_t numBins = 400 ;
933933 result->histogram.resize(numBins * nColorChannels);
934934
@@ -961,7 +961,7 @@ Task<shared_ptr<CanvasStatistics>> ImageCanvas::computeCanvasStatistics(
961961 {
962962 const size_t approxCost = numSamples *
963963 8 ; // constant factor to represent the increased workload of log/exp and somewhat random memory writes
964- const size_t numTasks = nextMultiple (ThreadPool::global ().nTasks <size_t >(0 , numPixels, approxCost), ( size_t ) nColorChannels);
964+ const size_t numTasks = nextMultiple (ThreadPool::global ().nTasks <size_t >(0 , numPixels, approxCost), nColorChannels);
965965 const size_t numTasksPerChannel = numTasks / nColorChannels;
966966
967967 vector<float > perTaskHistograms (numBins * nColorChannels * numTasks);
0 commit comments