스타일 바코드
using IronBarCode;
using IronSoftware.Drawing;

// Create a barcode
var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8);

// Resize in pixels
myBarcode.ResizeTo(400, 100);

// Set margins in pixels
myBarcode.SetMargins(5, 5, 5, 5);

// Set the color of the barcode
myBarcode.ChangeBarCodeColor(Color.Red);

// And save our barcode as an image:
myBarcode.SaveAsImage("EAN8.jpeg");

// Another supported feature is Mil Sizing
// Mil is a measurement unit used by the barcode scanner manufacturers to specify the minimum of one barcode bar, and at what distance the barcode can be scanned.
// It represents (1 / 1000)th of an inch
var barcodeResizeInMils = BarcodeWriter.CreateBarcode("5941623002802", BarcodeEncoding.Code128);

// This will resize the barcode width to 13 mil, at 96 DPI by default
barcodeResizeInMils.ResizeToMil(13);

// This will resize the barcode width to 10 mil and and the height to 1.5 inches, at 96 DPI by default
barcodeResizeInMils.ResizeToMil(10, 1.5);

// This will resize the barcode width to 7.5 mil and the height to 2 inches, with the DPI set to 200
barcodeResizeInMils.ResizeToMil(7.5, 2, 200);
NuGet 다운로드
PM > Install-Package BarCode
스타일 바코드

스타일 바코드

IronBarcode에서는 바코드를 크기를 조정하고, 여백을 추가하고, 색상을 변경하고, 다양한 인기 있는 파일 형식으로 저장할 수 있는 유연성이 있습니다. 더욱이, DPI 설정을 조정하여 이미지의 세부 사항에 대한 세밀한 제어가 가능합니다.

바코드 외관 맞춤화: 다양한 방법으로 바코드의 크기와 색상을 수정할 수 있습니다:

  • ResizeTo(500, 500): 바코드를 500x500 픽셀로 크기 조정합니다.
  • ChangeBarCodeColor: 바코드 내 막대의 색상을 변경합니다.
  • ChangeBackgroundColor: 배경색을 변경합니다.
IronBarcode로 바코드 스타일을 사용자 정의하는 방법 배우기
GitHub에서 보기

시작할 준비 되셨나요?

NuGet 다운로드 수 2,575,633버전:2026.11방금 출시