'Stride' Woes from a TransformedBitmap Object
问题 I have a 2208 x 3000 TransformedBitmap object with format {Indexed8} that I'm do .CopyPixels() on. I'm using (int)((formattedBitmap.PixelWidth * formattedBitmap.Format.BitsPerPixel + 7) / 8) (assuming 'formattedBitmap' is the name of the image from which I'm trying to copy the pixels) for the 'stride' value in my method call and an array of bytes which is 2208 in length. I have something just like this working elsewhere in the code (where the format of the image is {Gray8}. However, where I'm