I already tried this approach, but surpassing the amount of 4 images in sequence, were not even printed.
I found a way code solution through the collection of images, I create a bitmap and compose through the Graphics object, by managing the proportion of individual bitmap.
01.
Public
ReadOnly
Property
SequenceImages
As
Image
02.
Get
03.
04.
Dim
_Items = MySharedMethods.GetImages
05.
06.
'Create a dictionary with the index of each image and the correct size of each setting constant as the height, maintaining the proportion
07.
Dim
_ItemsDictionary =
New
Dictionary(Of
Integer
, Size)
08.
09.
Dim
_CompleteWith
As
Integer
= 0
10.
Dim
_CompleteHeight
As
Integer
= m_DimensioneMarchi
11.
12.
Dim
_Height = m_DimensioneMarchi
13.
14.
For
_Index = 0
To
_Items.Count - 1
15.
16.
Dim
_Image = _Items(_Index).Marchio
17.
18.
Dim
_Width =
CInt
((_Image.Width * m_DimensioneMarchi) / _Image.Height)
19.
20.
_ItemsDictionary.Add(_Index,
New
Size(_Width, _Height))
21.
22.
'Trace the length of the final bitmap
23.
_CompleteWith += (_Width + m_MargineMarchi)
24.
25.
Next
26.
27.
'I compose the final bitmap based on the information of the previously constructed Dictionary
28.
Dim
_Bitmap
As
New
Bitmap(_CompleteWith, _CompleteHeight)
29.
30.
Dim
_Graphics = Graphics.FromImage(_Bitmap)
31.
32.
With
_Graphics
33.
34.
.CompositingMode = Drawing2D.CompositingMode.SourceCopy
35.
.CompositingQuality = Drawing2D.CompositingQuality.HighQuality
36.
37.
.Clear(Color.White)
38.
39.
Dim
_X
As
Integer
= 0
40.
41.
For
Each
_Item
In
_ItemsDictionary
42.
43.
Dim
_Size = _Item.Value
44.
45.
.DrawImage(_Items(_Item.Key).Marchio, _X, 0, _Size.Width, _Size.Height)
46.
47.
'It moves the horizontal position for the next mark
48.
_X += (_Size.Width + m_MargineMarchi)
49.
50.
Next
51.
52.
.Dispose()
53.
54.
End
With
55.
56.
Return
_Bitmap
57.
58.
End
Get
59.
60.
End
Property