示例#1
0
        public static ImageBuffer ImageHandleToImageBuffer(int imageHandle, FSDK.FSDK_IMAGEMODE imageMode = FSDK.FSDK_IMAGEMODE.FSDK_IMAGE_COLOR_32BIT)
        {
            FSDK.SaveImageToBuffer(imageHandle, out var buffer, imageMode);

            int width = 0, height = 0;

            FSDK.GetImageWidth(imageHandle, ref width);
            FSDK.GetImageHeight(imageHandle, ref height);

            return(new ImageBuffer(buffer, width, height, imageMode.BytesPerPixel()));
        }