Dim Sheet2 As XLS.Sheet = Book.Sheets(0)
Dim img As Image
For pg As Integer = 0 To vars("pg") - 1
img = getImage(qzs(rand.Next(0, qzs.Count)))
Dim cz As Integer = Rand.Next (1, 4)
Select Case cz
Case 1
img.RotateFlip(RotateFlipType.Rotate90FlipNone)
Case 2
img.rotateflip(RotateFlipType.Rotate180FlipNone)
Case 3
img.rotateflip(RotateFlipType.Rotate270FlipNone)
End Select
Sheet2(pg * 21 + 13, 13).Value = New XLS.Picture(img, 0, 0, 100, img.Height / img.Width * 100)
Next
Book.Save(fl)
img.Dispose
gc.Collect