'複数解像度のマルチページ TIFF (1,971,467 バイト) ' http://merovingio.c2rmf.cnrs.fr/iipimage/PalaisDuLouvre.tif Dim imgFile As String = "C:\temp\PalaisDuLouvre.tif" Dim fs As New FileStream(imgFile, FileMode.Open) Dim bmp1 As New Bitmap(fs) 'フレームを第3ページに切り替える bmp1.SelectActiveFrame(FrameDimension.Page, 3) 'クローンして bmp2 を生成 Dim bmp2 As Bitmap = DirectCast(bmp1.Clone(), Bitmap) fs.Dispose() bmp2.SelectActiveFrame(FrameDimension.Page, 5)
Dim images As New List(Of Image)() For idx As Integer = 0 To frameCount - 1 srcImage.SelectActiveFrame(fd, idx) Dim bmp As New Bitmap(srcImage.Width, srcImage.Height) Using g = Graphics.FromImage(bmp) g.DrawImage(srcImage, 0, 0) End Using images.Add(bmp) Next Return images.ToArray()