製品版Ver. 2.3.0.0を、.NET 1.1 にて使用しております。
下記の関数にてコンビニ用バーコードを一括作成しておりますが、大量に作成した場合に処理速度が落ちます。
300件作成時、600件/分。1500件作成時、56件/分。
PCの処理速度の問題もあるかと思いますが、改善する方法はないでしょうか。
Public Shared Sub DrawBarCode(ByVal KCs As ArrayList, ByVal sFilePath As String, ByVal SEI_Y As String)
Dim bmp As New Bitmap(700, 220)
bmp.SetResolution(300, 300)
Dim g As Graphics = Graphics.FromImage(bmp)
g.PageUnit = GraphicsUnit.Display
g.FillRectangle(New SolidBrush(Color.White), 0, 0, bmp.Width, bmp.Height)
Dim code As String = String.Empty
Dim ean128 As Pao.BarCode.EAN128
Try
ean128 = New Pao.BarCode.EAN128(g)
ean128.RotateAngle = angle
ean128.TextWrite = True
ean128.TextKintou = False
ean128.KuroBarChousei = 0
ean128.ShiroBarChousei = 0
ean128.TextFont = New Font("MS ゴシック", 8)
For Each KC As String In KCs
code = "{FNC1}9100000000000000000" & KC & "00000000005000"
ean128.DrawConvenience(code, 0, 0, 11)
bmp.Save(sFilePath, Imaging.ImageFormat.Gif) 'sFilePathのパスにKCのファイル名で保存
g.Clear(Color.White)
Next
Catch ex As Exception
Throw ex
Finally
bmp = Nothing
g = Nothing
ean128 = Nothing
End Try
End Sub
下記の関数にてコンビニ用バーコードを一括作成しておりますが、大量に作成した場合に処理速度が落ちます。
300件作成時、600件/分。1500件作成時、56件/分。
PCの処理速度の問題もあるかと思いますが、改善する方法はないでしょうか。
Public Shared Sub DrawBarCode(ByVal KCs As ArrayList, ByVal sFilePath As String, ByVal SEI_Y As String)
Dim bmp As New Bitmap(700, 220)
bmp.SetResolution(300, 300)
Dim g As Graphics = Graphics.FromImage(bmp)
g.PageUnit = GraphicsUnit.Display
g.FillRectangle(New SolidBrush(Color.White), 0, 0, bmp.Width, bmp.Height)
Dim code As String = String.Empty
Dim ean128 As Pao.BarCode.EAN128
Try
ean128 = New Pao.BarCode.EAN128(g)
ean128.RotateAngle = angle
ean128.TextWrite = True
ean128.TextKintou = False
ean128.KuroBarChousei = 0
ean128.ShiroBarChousei = 0
ean128.TextFont = New Font("MS ゴシック", 8)
For Each KC As String In KCs
code = "{FNC1}9100000000000000000" & KC & "00000000005000"
ean128.DrawConvenience(code, 0, 0, 11)
bmp.Save(sFilePath, Imaging.ImageFormat.Gif) 'sFilePathのパスにKCのファイル名で保存
g.Clear(Color.White)
Next
Catch ex As Exception
Throw ex
Finally
bmp = Nothing
g = Nothing
ean128 = Nothing
End Try
End Sub