I am using the following way to copy a region from a bitmap in rgb565 pixel format:
void bmpcpy(size_t left, size_t top, size_t right, size_t bottom) {
size_t index = 0;
do {
do {
bmpCopy[index] = bmpSrc[(top * BMP_WIDTH) + left];
index++;
} while (++left < right);
} while (++top < bottom);
}
Is there a faster way to do the copy?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…