Public Class CtlImage

    Private _dispacher As FormDispacher = FormDispacher.GetInstance

    Private _pictureBox As PictureBox

    Private Sub btnRotate_Click(sender As Object, e As EventArgs) Handles btnRotate.Click
        Dim bmp As Bitmap = New Bitmap(_fileViewParam.FileName)
        '180度回転して、水平方向に反転
        '"Rotate180FlipX"の"Rotate180"は180度回転することを意味し、
        '"FlipX"は水平方向に反転することを意味する
        bmp.RotateFlip(RotateFlipType.Rotate180FlipX)
        '表示
        _pictureBox.Image = bmp
    End Sub


    Private _fileViewParam As FileViewParam

    Public Sub SetFileInfo(f As FileViewParam)
        Me._fileViewParam = f
        If f Is Nothing Then
            Return
        End If
        _pictureBox = _dispacher.ShowImage()
        _pictureBox.ImageLocation = _fileViewParam.FileName
        _pictureBox.SizeMode = PictureBoxSizeMode.Zoom 'サイズ調整


    End Sub
End Class
