AutoRotate result #462
Unanswered
MichelMichels
asked this question in
Q&A
Replies: 3 comments
-
I created a repository to showcase my problem: https://github.com/MichelMichels/zxing-code-128-bug The code reads an image file (through SkiaSharp) and draws a red rectangle around the barcode when found. Also draws the value of the barcode above the barcode. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I fixed it in a hacky way: var barcodeWidth = Math.Abs(lastPoint.X - firstPoint.X);
var barcodeHeight = 100f;
SKPoint leftPoint, rightPoint;
if (firstPoint.X > lastPoint.X)
{
// image is rotated 180 degrees
leftPoint = new SKPoint(outputImage.Width - firstPoint.X, outputImage.Height - barcodeHeight - firstPoint.Y );
rightPoint = new SKPoint(outputImage.Width - lastPoint.X, outputImage.Height - barcodeHeight - lastPoint.Y);
} else
{
leftPoint = firstPoint;
rightPoint = lastPoint;
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
The property |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, is it possible to see if a detected barcode was
AutoRotate
d?I have a case where a CODE 128 barcode is detected, but the resultpoints I get back are incompatible with the original image and I suppose that I have to rotate the resultpoints to get the original coordinates on the image.
Beta Was this translation helpful? Give feedback.
All reactions