Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/FreeImage/BitmapAccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ FreeImage_GetTransparencyCount(FIBITMAP *dib) {
void DLL_CALLCONV
FreeImage_SetTransparencyTable(FIBITMAP *dib, uint8_t *table, int count) {
if (dib) {
count = MAX(0, MIN(count, 256));
count = std::clamp(count, 0, 256);
if (FreeImage_GetBPP(dib) <= 8) {
((FREEIMAGEHEADER *)dib->data)->transparent = (count > 0) ? TRUE : FALSE;
((FREEIMAGEHEADER *)dib->data)->transparency_count = count;
Expand Down
14 changes: 7 additions & 7 deletions Source/FreeImage/Conversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ SwapRedBlue32(FIBITMAP* dib) {
uint8_t* line = FreeImage_GetBits(dib);
for (unsigned y = 0; y < height; ++y, line += pitch) {
for (uint8_t* pixel = line; pixel < line + lineSize ; pixel += bytesperpixel) {
INPLACESWAP(pixel[0], pixel[2]);
std::swap(pixel[0], pixel[2]);
}
}

Expand Down Expand Up @@ -123,9 +123,9 @@ CMYKToRGB(T C, T M, T Y, T K, T* out) {
unsigned b = (max_val - Y) * (max_val - K) / max_val;

// clamp values to [0..max_val]
T red = (T)CLAMP(r, (unsigned)0, max_val);
T green = (T)CLAMP(g, (unsigned)0, max_val);
T blue = (T)CLAMP(b, (unsigned)0, max_val);
T red = (T)std::clamp(r, (unsigned)0, max_val);
T green = (T)std::clamp(g, (unsigned)0, max_val);
T blue = (T)std::clamp(b, (unsigned)0, max_val);

assignRGB(red, green, blue, out);
}
Expand Down Expand Up @@ -276,9 +276,9 @@ CIELabToRGB(float L, float a, float b, T *rgb) {
XYZToRGB(X, Y, Z, &R, &G, &B);

// clamp values to [0..max_val]
T red = (T)CLAMP(R * max_val, 0.0F, max_val);
T green = (T)CLAMP(G * max_val, 0.0F, max_val);
T blue = (T)CLAMP(B * max_val, 0.0F, max_val);
T red = (T)std::clamp(R * max_val, 0.F, max_val);
T green = (T)std::clamp(G * max_val, 0.F, max_val);
T blue = (T)std::clamp(B * max_val, 0.F, max_val);

assignRGB(red, green, blue, rgb);
}
Expand Down
4 changes: 2 additions & 2 deletions Source/FreeImage/ConversionFloat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ FreeImage_ConvertToFloat(FIBITMAP *dib, FIBOOL scale_linear) {
case FIT_RGBF:
if (scale_linear) {
BitmapTransform<float, FIRGBF>(dst, src, [](const FIRGBF& p) {
return CLAMP(LUMA_REC709(p.red, p.green, p.blue), 0.0F, 1.0F); });
return std::clamp(LUMA_REC709(p.red, p.green, p.blue), 0.F, 1.F); });
}
else {
BitmapTransform<float, FIRGBF>(dst, src, [](const FIRGBF& p) {
Expand All @@ -196,7 +196,7 @@ FreeImage_ConvertToFloat(FIBITMAP *dib, FIBOOL scale_linear) {
case FIT_RGBAF:
if (scale_linear) {
BitmapTransform<float, FIRGBAF>(dst, src, [](const FIRGBAF& p) {
return CLAMP(LUMA_REC709(p.red, p.green, p.blue), 0.0F, 1.0F); });
return std::clamp(LUMA_REC709(p.red, p.green, p.blue), 0.F, 1.F); });
}
else {
BitmapTransform<float, FIRGBAF>(dst, src, [](const FIRGBAF& p) {
Expand Down
42 changes: 21 additions & 21 deletions Source/FreeImage/ConversionRGBAF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ FreeImage_ConvertToRGBAF(FIBITMAP *dib) {
auto *dst_pixel = (FIRGBAF*)dst_bits;
for (unsigned x = 0; x < width; x++) {
// convert and scale to the range [0..1]
dst_pixel->red = (float)(src_pixel[FI_RGBA_RED]) / 255.0F;
dst_pixel->green = (float)(src_pixel[FI_RGBA_GREEN]) / 255.0F;
dst_pixel->blue = (float)(src_pixel[FI_RGBA_BLUE]) / 255.0F;
dst_pixel->alpha = (float)(src_pixel[FI_RGBA_ALPHA]) / 255.0F;
dst_pixel->red = (float)(src_pixel[FI_RGBA_RED]) / 255.F;
dst_pixel->green = (float)(src_pixel[FI_RGBA_GREEN]) / 255.F;
dst_pixel->blue = (float)(src_pixel[FI_RGBA_BLUE]) / 255.F;
dst_pixel->alpha = (float)(src_pixel[FI_RGBA_ALPHA]) / 255.F;

src_pixel += bytespp;
dst_pixel++;
Expand All @@ -146,11 +146,11 @@ FreeImage_ConvertToRGBAF(FIBITMAP *dib) {

for (unsigned x = 0; x < width; x++) {
// convert and scale to the range [0..1]
const float dst_value = (float)src_pixel[x] / 65535.0F;
const float dst_value = (float)src_pixel[x] / 65535.F;
dst_pixel[x].red = dst_value;
dst_pixel[x].green = dst_value;
dst_pixel[x].blue = dst_value;
dst_pixel[x].alpha = 1.0F;
dst_pixel[x].alpha = 1.F;
}
src_bits += src_pitch;
dst_bits += dst_pitch;
Expand All @@ -169,10 +169,10 @@ FreeImage_ConvertToRGBAF(FIBITMAP *dib) {

for (unsigned x = 0; x < width; x++) {
// convert and scale to the range [0..1]
dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.0F;
dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.0F;
dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.0F;
dst_pixel[x].alpha = 1.0F;
dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.F;
dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.F;
dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.F;
dst_pixel[x].alpha = 1.F;
}
src_bits += src_pitch;
dst_bits += dst_pitch;
Expand All @@ -191,10 +191,10 @@ FreeImage_ConvertToRGBAF(FIBITMAP *dib) {

for (unsigned x = 0; x < width; x++) {
// convert and scale to the range [0..1]
dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.0F;
dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.0F;
dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.0F;
dst_pixel[x].alpha = (float)(src_pixel[x].alpha) / 65535.0F;
dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.F;
dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.F;
dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.F;
dst_pixel[x].alpha = (float)(src_pixel[x].alpha) / 65535.F;
}
src_bits += src_pitch;
dst_bits += dst_pitch;
Expand All @@ -216,7 +216,7 @@ FreeImage_ConvertToRGBAF(FIBITMAP *dib) {
dst_pixel[x].red = (float)(src_pixel[x].red / static_cast<double>(std::numeric_limits<uint32_t>::max()));
dst_pixel[x].green = (float)(src_pixel[x].green / static_cast<double>(std::numeric_limits<uint32_t>::max()));
dst_pixel[x].blue = (float)(src_pixel[x].blue / static_cast<double>(std::numeric_limits<uint32_t>::max()));
dst_pixel[x].alpha = 1.0F;
dst_pixel[x].alpha = 1.F;
}
src_bits += src_pitch;
dst_bits += dst_pitch;
Expand Down Expand Up @@ -258,11 +258,11 @@ FreeImage_ConvertToRGBAF(FIBITMAP *dib) {
for (unsigned x = 0; x < width; x++) {
// convert by copying greyscale channel to each R, G, B channels
// assume float values are in [0..1]
const float value = CLAMP(src_pixel[x], 0.0F, 1.0F);
const float value = std::clamp(src_pixel[x], 0.F, 1.F);
dst_pixel[x].red = value;
dst_pixel[x].green = value;
dst_pixel[x].blue = value;
dst_pixel[x].alpha = 1.0F;
dst_pixel[x].alpha = 1.F;
}
src_bits += src_pitch;
dst_bits += dst_pitch;
Expand All @@ -281,10 +281,10 @@ FreeImage_ConvertToRGBAF(FIBITMAP *dib) {

for (unsigned x = 0; x < width; x++) {
// convert pixels directly, while adding a "dummy" alpha of 1.0
dst_pixel[x].red = CLAMP(src_pixel[x].red, 0.0F, 1.0F);
dst_pixel[x].green = CLAMP(src_pixel[x].green, 0.0F, 1.0F);
dst_pixel[x].blue = CLAMP(src_pixel[x].blue, 0.0F, 1.0F);
dst_pixel[x].alpha = 1.0F;
dst_pixel[x].red = std::clamp(src_pixel[x].red, 0.F, 1.F);
dst_pixel[x].green = std::clamp(src_pixel[x].green, 0.F, 1.F);
dst_pixel[x].blue = std::clamp(src_pixel[x].blue, 0.F, 1.F);
dst_pixel[x].alpha = 1.F;
}
src_bits += src_pitch;
dst_bits += dst_pitch;
Expand Down
30 changes: 15 additions & 15 deletions Source/FreeImage/ConversionRGBF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {
auto *dst_pixel = (FIRGBF*)dst_bits;
for (unsigned x = 0; x < width; x++) {
// convert and scale to the range [0..1]
dst_pixel->red = (float)(src_pixel[FI_RGBA_RED]) / 255.0F;
dst_pixel->green = (float)(src_pixel[FI_RGBA_GREEN]) / 255.0F;
dst_pixel->blue = (float)(src_pixel[FI_RGBA_BLUE]) / 255.0F;
dst_pixel->red = (float)(src_pixel[FI_RGBA_RED]) / 255.F;
dst_pixel->green = (float)(src_pixel[FI_RGBA_GREEN]) / 255.F;
dst_pixel->blue = (float)(src_pixel[FI_RGBA_BLUE]) / 255.F;

src_pixel += bytespp;
dst_pixel ++;
Expand All @@ -148,7 +148,7 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {

for (unsigned x = 0; x < width; x++) {
// convert and scale to the range [0..1]
const float dst_value = (float)src_pixel[x] / 65535.0F;
const float dst_value = (float)src_pixel[x] / 65535.F;
dst_pixel[x].red = dst_value;
dst_pixel[x].green = dst_value;
dst_pixel[x].blue = dst_value;
Expand All @@ -170,9 +170,9 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {

for (unsigned x = 0; x < width; x++) {
// convert and scale to the range [0..1]
dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.0F;
dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.0F;
dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.0F;
dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.F;
dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.F;
dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.F;
}
src_bits += src_pitch;
dst_bits += dst_pitch;
Expand All @@ -191,9 +191,9 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {

for (unsigned x = 0; x < width; x++) {
// convert and scale to the range [0..1]
dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.0F;
dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.0F;
dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.0F;
dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.F;
dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.F;
dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.F;
}
src_bits += src_pitch;
dst_bits += dst_pitch;
Expand Down Expand Up @@ -255,7 +255,7 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {
for (unsigned x = 0; x < width; x++) {
// convert by copying greyscale channel to each R, G, B channels
// assume float values are in [0..1]
const float value = CLAMP(src_pixel[x], 0.0F, 1.0F);
const float value = std::clamp(src_pixel[x], 0.F, 1.F);
dst_pixel[x].red = value;
dst_pixel[x].green = value;
dst_pixel[x].blue = value;
Expand All @@ -278,7 +278,7 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {
for (unsigned x = 0; x < width; x++) {
// convert by copying greyscale channel to each R, G, B channels
// assume float values are in [0..1]
const float value = static_cast<float>(CLAMP(src_pixel[x], 0.0, 1.0));
const float value = static_cast<float>(std::clamp(src_pixel[x], 0.0, 1.0));
dst_pixel[x].red = value;
dst_pixel[x].green = value;
dst_pixel[x].blue = value;
Expand All @@ -300,9 +300,9 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {

for (unsigned x = 0; x < width; x++) {
// convert and skip alpha channel
dst_pixel[x].red = CLAMP(src_pixel[x].red, 0.0F, 1.0F);
dst_pixel[x].green = CLAMP(src_pixel[x].green, 0.0F, 1.0F);
dst_pixel[x].blue = CLAMP(src_pixel[x].blue, 0.0F, 1.0F);
dst_pixel[x].red = std::clamp(src_pixel[x].red, 0.F, 1.F);
dst_pixel[x].green = std::clamp(src_pixel[x].green, 0.F, 1.F);
dst_pixel[x].blue = std::clamp(src_pixel[x].blue, 0.F, 1.F);
}
src_bits += src_pitch;
dst_bits += dst_pitch;
Expand Down
4 changes: 2 additions & 2 deletions Source/FreeImage/ConversionType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ CONVERT_TYPE<Tdst, Tsrc>::convert(FIBITMAP *src, FREE_IMAGE_TYPE dst_type) {

/** Convert a greyscale image of type Tsrc to a 8-bit grayscale dib.
Conversion is done using either a linear scaling from [min, max] to [0, 255]
or a rounding from src_pixel to (uint8_t) MIN(255, MAX(0, q)) where int q = int(src_pixel + 0.5);
or a rounding from src_pixel to (uint8_t) clamp(q, 0, 255) where int q = int(src_pixel + 0.5);
*/
template<class Tsrc>
class CONVERT_TO_BYTE
Expand Down Expand Up @@ -134,7 +134,7 @@ CONVERT_TO_BYTE<Tsrc>::convert(FIBITMAP *src, FIBOOL scale_linear) {
for (x = 0; x < width; x++) {
// rounding
int q = int(src_bits[x] + 0.5);
dst_bits[x] = (uint8_t) MIN(255, MAX(0, q));
dst_bits[x] = (uint8_t) std::clamp(q, 0, 255);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/FreeImage/MNGHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ mng_WriteJNG(int format_id, FreeImageIO *io, FIBITMAP *dib, fi_handle handle, in
// write chunks
for (uint32_t k = 0; k < size_in_bytes;) {
uint32_t bytes_left = size_in_bytes - k;
uint32_t chunk_size = MIN(JPEG_CHUNK_SIZE, bytes_left);
uint32_t chunk_size = std::min(JPEG_CHUNK_SIZE, bytes_left);
mng_WriteChunk(mng_JDAT, &jpeg_data[k], chunk_size, hJngMemory);
k += chunk_size;
}
Expand Down
5 changes: 2 additions & 3 deletions Source/FreeImage/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#else
#include <ctype.h>
#endif // _WIN32
#include <format>

#include <filesystem>

Expand Down Expand Up @@ -787,9 +788,7 @@ namespace {

std::filesystem::path MakeRandomSuffix()
{
std::stringstream strs{};
strs << ".fitmp" << std::hex << static_cast<uint32_t>(std::rand());
return strs.str();
return std::format(".fitmp{:x}", static_cast<uint32_t>(std::rand()));
}


Expand Down
12 changes: 6 additions & 6 deletions Source/FreeImage/tmoColorConvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ LuminanceFromYxy(FIBITMAP *Yxy, float *maxLum, float *minLum, float *worldLum) {
for (unsigned y = 0; y < height; y++) {
auto *pixel = (const FIRGBF*)bits;
for (unsigned x = 0; x < width; x++) {
const float Y = MAX(0.0F, pixel[x].red);// avoid negative values
max_lum = (max_lum < Y) ? Y : max_lum; // max Luminance in the scene
min_lum = (min_lum < Y) ? min_lum : Y; // min Luminance in the scene
const float Y = std::max(0.F, pixel[x].red);// avoid negative values
max_lum = std::max(max_lum, Y); // max Luminance in the scene
min_lum = std::min(min_lum, Y); // min Luminance in the scene
sum += log(2.3e-5F + Y); // contrast constant in Tumblin paper
}
// next line
Expand Down Expand Up @@ -292,9 +292,9 @@ ClampConvertRGBFTo24(FIBITMAP *src) {
const float green = (src_pixel[x].green > 1) ? 1 : src_pixel[x].green;
const float blue = (src_pixel[x].blue > 1) ? 1 : src_pixel[x].blue;

dst_pixel[FI_RGBA_RED] = (uint8_t)(255.0F * red + 0.5F);
dst_pixel[FI_RGBA_GREEN] = (uint8_t)(255.0F * green + 0.5F);
dst_pixel[FI_RGBA_BLUE] = (uint8_t)(255.0F * blue + 0.5F);
dst_pixel[FI_RGBA_RED] = (uint8_t)(255.F * red + 0.5F);
dst_pixel[FI_RGBA_GREEN] = (uint8_t)(255.F * green + 0.5F);
dst_pixel[FI_RGBA_BLUE] = (uint8_t)(255.F * blue + 0.5F);
dst_pixel += 3;
}
src_bits += src_pitch;
Expand Down
6 changes: 3 additions & 3 deletions Source/FreeImage/tmoFattal02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static FIBITMAP* tmoFattal02(FIBITMAP *Y, float alpha, float beta) {
// get the number of levels for the pyramid
const unsigned width = FreeImage_GetWidth(H);
const unsigned height = FreeImage_GetHeight(H);
unsigned minsize = MIN(width, height);
unsigned minsize = std::min(width, height);
while (minsize >= MIN_PYRAMID_SIZE) {
nlevels++;
minsize /= 2;
Expand Down Expand Up @@ -607,8 +607,8 @@ Apply the Gradient Domain High Dynamic Range Compression to a RGBF image and con
FIBITMAP* DLL_CALLCONV
FreeImage_TmoFattal02(FIBITMAP *dib, double color_saturation, double attenuation) {
const float alpha = 0.1F; // parameter alpha = 0.1
const float beta = (float)MAX(0.8, MIN(0.9, attenuation)); // parameter beta = [0.8..0.9]
const float s = (float)MAX(0.4, MIN(0.6, color_saturation));// exponent s controls color saturation = [0.4..0.6]
const float beta = (float)std::clamp(attenuation, 0.8, 0.9); // parameter beta = [0.8..0.9]
const float s = (float)std::clamp(color_saturation, 0.4, 0.6);// exponent s controls color saturation = [0.4..0.6]

FIBITMAP *src{};
FIBITMAP *Yin{};
Expand Down
2 changes: 1 addition & 1 deletion Source/FreeImageToolkit/BSplineRotate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ Rotate8Bit(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x
p = (double)InterpolatedValue(ImageRasterArray, width, height, x1, y1, spline);
}
// clamp and convert to uint8_t
dst_bits[x] = (uint8_t)MIN(MAX((int)0, (int)(p + 0.5)), (int)255);
dst_bits[x] = (uint8_t)std::clamp((int)(p + 0.5), 0, 255);
}
}

Expand Down
4 changes: 2 additions & 2 deletions Source/FreeImageToolkit/Background.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,8 @@ FreeImage_EnlargeCanvas(FIBITMAP *src, int left, int top, int right, int bottom,
unsigned srcPitch = FreeImage_GetPitch(src);
unsigned dstPitch = FreeImage_GetPitch(dst);

int lineWidth = bytespp * (width + MIN(0, left) + MIN(0, right));
int lines = height + MIN(0, top) + MIN(0, bottom);
int lineWidth = bytespp * (width + std::min(0, left) + std::min(0, right));
int lines = height + std::min(0, top) + std::min(0, bottom);

if (left <= 0) {
srcPtr += (-left * bytespp);
Expand Down
8 changes: 4 additions & 4 deletions Source/FreeImageToolkit/ClassicRotate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,13 @@ Rotate90(FIBITMAP *src) {
for (unsigned xs = 0; xs < dst_width; xs += RBLOCK) {
// y-segment
for (unsigned ys = 0; ys < dst_height; ys += RBLOCK) {
for (unsigned y = ys; y < MIN(dst_height, ys + RBLOCK); y++) { // do rotation
for (unsigned y = ys; y < std::min(dst_height, ys + RBLOCK); y++) { // do rotation
const unsigned y2 = dst_height - y - 1;
// point to src pixel at (y2, xs)
const uint8_t *src_bits = bsrc + (xs * src_pitch) + (y2 * bytespp);
// point to dst pixel at (xs, y)
uint8_t *dst_bits = bdest + (y * dst_pitch) + (xs * bytespp);
for (unsigned x = xs; x < MIN(dst_width, xs + RBLOCK); x++) {
for (unsigned x = xs; x < std::min(dst_width, xs + RBLOCK); x++) {
// dst.SetPixel(x, y, src.GetPixel(y2, x));
AssignPixel(dst_bits, src_bits, bytespp);
dst_bits += bytespp;
Expand Down Expand Up @@ -580,13 +580,13 @@ Rotate270(FIBITMAP *src) {
for (unsigned xs = 0; xs < dst_width; xs += RBLOCK) {
// y-segment
for (unsigned ys = 0; ys < dst_height; ys += RBLOCK) {
for (unsigned x = xs; x < MIN(dst_width, xs + RBLOCK); x++) { // do rotation
for (unsigned x = xs; x < std::min(dst_width, xs + RBLOCK); x++) { // do rotation
x2 = dst_width - x - 1;
// point to src pixel at (ys, x2)
const uint8_t *src_bits = bsrc + (x2 * src_pitch) + (ys * bytespp);
// point to dst pixel at (x, ys)
uint8_t *dst_bits = bdest + (ys * dst_pitch) + (x * bytespp);
for (unsigned y = ys; y < MIN(dst_height, ys + RBLOCK); y++) {
for (unsigned y = ys; y < std::min(dst_height, ys + RBLOCK); y++) {
// dst.SetPixel(x, y, src.GetPixel(y, x2));
AssignPixel(dst_bits, src_bits, bytespp);
src_bits += bytespp;
Expand Down
Loading