Barbecue Barcode Libraryに問題があります。シンプルな code128 バーコードを作成しようとしていますが、得られるイメージは、他のオンライン (つまりhttp://barcode-generator.org ) およびデスクトップ (つまり Zing) バーコード ジェネレーターから得られるものとは異なります。
私が使用しているColdFusionコードは次のとおりです。
<cfscript>
LOCAL.BarcodeData = "10047846";
LOCAL.BarcodeFactory = CreateObject("java", "net.sourceforge.barbecue.BarcodeFactory");
LOCAL.Barcode = LOCAL.BarCodeFactory.createCode128(LOCAL.BarcodeData);
LOCAL.BarcodeImageHandler = CreateObject("java", "net.sourceforge.barbecue.BarcodeImageHandler");
LOCAL.BarcodeBufferedImage = LOCAL.BarcodeImageHandler.getImage(LOCAL.Barcode);
LOCAL.BarcodeImage = ImageNew(LOCAL.BarcodeBufferedImage);
LOCAL.BarcodeImagePath =
"C:\temp_\barcode-" & LOCAL.BarcodeData & ".jpg";
ImageWrite(LOCAL.BarcodeImage, LOCAL.BarcodeImagePath, 1);
</cfscript>
<cfimage action="writeToBrowser" source="#LOCAL.BarcodeImagePath#" />
これにより、次の画像が出力されます。
それでも、Zingデスクトッププログラムから得られるものは次のとおりです。
そして、これがbarcode-generator.orgから得たものです:
現在、サイズ変更、スケーリングなどの問題はありません。しかし、バーベキューで生成された画像が大きく異なることは簡単にわかります。最初の数本のバーを見てください。
なぜこうなった?これはバーベキューのバグですか、それとも何か間違っていますか?