我的代码:
private static string GetBarcode(Bitmap btBitmap)
{
IBarcodeReader reader = new BarcodeReader
{
AutoRotate = true,
TryInverted = true,
Options =
{
PossibleFormats = new List<BarcodeFormat> { BarcodeFormat.CODE_39 },
TryHarder = true,
ReturnCodabarStartEnd = true,
PureBarcode = false
}
};
return reader.DecodeMultiple(btBitmap)?.ToString();
}
返回一个空值,但如果你旋转 90 度,一切都读得很好。怎么了?