Image with barcode rotated 90 degrees
我的代码:
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度,则一切都读得很好。 怎么了?