0

I'm trying to mirror a raw (without image header) BGR image, 8 bit per pixel, using the following code:

void mirrorBGR(byte* src, byte* dst, UINT width, UINT height, UINT pitch_s, UINT pitch_d)
    {
        IppiSize size;
        size.width = width;
        size.height = height;
        IppStatus status = ippiMirror_8u_C3R(src, pitch_s, dst ,pitch_d, size, ippAxsVertical);
        if (status != ippStsNoErr)
        {
            printf("Mirror RGB24 failed: %d",status);
        }
    }

The image size is 640x360. pitch_s = pitch_d = width = 640. What could be the problem?

Kara
  • 6,115
  • 16
  • 50
  • 57
  • "What could be the problem?" You don't say what that problem is. – Jongware Jul 27 '14 at 17:10
  • @Jongware, you're right, of course. Typed it too quickly without checking what exactly the wording... Thanks for the notice. –  Jul 28 '14 at 06:55

1 Answers1

0

Pitch is the scanline length for source & dest bitmaps.

If you use no padding, at least it should 640 (width) * 3 (bytes per pixel) = 1920

Mauro H. Leggieri
  • 1,084
  • 11
  • 25