trim whitespace for 1D barcode
This commit is contained in:
parent
45e1f5ec9e
commit
cf2881238c
|
@ -112,7 +112,9 @@ func scale1DCode(bc Barcode, width, height int) (Barcode, error) {
|
|||
if factor <= 0 {
|
||||
return nil, fmt.Errorf("can not scale barcode to an image smaller than %dx1", orgWidth)
|
||||
}
|
||||
offsetX := (width - (orgWidth * factor)) / 2
|
||||
|
||||
width = (orgWidth * factor) + 2
|
||||
offsetX := 1
|
||||
|
||||
wrap := func(x, y int) color.Color {
|
||||
if x < offsetX {
|
||||
|
|
Loading…
Reference in New Issue