@@ -543,13 +543,13 @@ template<PixelType P, typename C>
543543}
544544
545545// / Run a parallelizable/vectorizable operation on the given image data.
546- template <PixelType IN , typename Func>
546+ template <PixelType InputPixel , typename Func>
547547void transformInPlace (std::span<std::byte> imageData, Func callback) {
548548 if (imageData.empty ()) {
549549 return ;
550550 }
551551
552- std::span<IN > imageDataSpan{reinterpret_cast <IN *>(imageData.data ()), imageData.size () / sizeof (IN )};
552+ std::span<InputPixel > imageDataSpan{reinterpret_cast <InputPixel *>(imageData.data ()), imageData.size () / sizeof (InputPixel )};
553553 std::transform (
554554#ifdef SOURCEPP_BUILD_WITH_TBB
555555 std::execution::par_unseq,
@@ -562,17 +562,17 @@ void transformInPlace(std::span<std::byte> imageData, Func callback) {
562562}
563563
564564// / Run a parallelizable/vectorizable operation on the given image data, and return new image data.
565- template <PixelType IN , PixelType OUT , typename Func>
565+ template <PixelType InputPixel , PixelType OutputPixel , typename Func>
566566[[nodiscard]] std::vector<std::byte> transform (std::span<const std::byte> imageData, Func callback) {
567567 if (imageData.empty ()) {
568568 return {};
569569 }
570570
571571 std::vector<std::byte> newData;
572- newData.resize (imageData.size () / sizeof (IN ) * sizeof (OUT ));
573- std::span newDataSpan{reinterpret_cast <OUT *>(newData.data ()), newData.size () / sizeof (OUT )};
572+ newData.resize (imageData.size () / sizeof (InputPixel ) * sizeof (OutputPixel ));
573+ std::span newDataSpan{reinterpret_cast <OutputPixel *>(newData.data ()), newData.size () / sizeof (OutputPixel )};
574574
575- std::span<const IN > imageDataSpan{reinterpret_cast <const IN *>(imageData.data ()), imageData.size () / sizeof (IN )};
575+ std::span<const InputPixel > imageDataSpan{reinterpret_cast <const InputPixel *>(imageData.data ()), imageData.size () / sizeof (InputPixel )};
576576 std::transform (
577577#ifdef SOURCEPP_BUILD_WITH_TBB
578578 std::execution::par_unseq,
0 commit comments