I'm using ImageMagick.NET library to create simple Multi-Image Converter. This is the problem:
Code: Select all
Value of type 'ImageMagick.MagickFormat' cannot be converted to 'System.Drawing.Imaging.ImageFormat'.
Code: Select all
If DataGridView1.Rows.Count > 0 And FolderBrowserDialog1.ShowDialog <> DialogResult.Cancel Then
Dim j As Integer = 0
Dim spath As String = ""
Dim fpath As String = FolderBrowserDialog1.SelectedPath
For j = 0 To DataGridView.Rows.Count - 1
spath = fpath & "\" & DataGridView1.Item(0, j).Value.ToString.Substring(dgvFiles.Item(0, j).Value.ToString.LastIndexOf("\") + 1, (DataGridView1.Item(0, j).Value.ToString.LastIndexOf(".") - DataGridView1.Item(0, j).Value.ToString.LastIndexOf("\")) - 1)
PictureBox1.Image = Image.FromFile(dgvFiles.Item(0, j).Value.ToString)
ElseIf combobox1.SelectedItem = "Joint Photographic Experts Group (JPG)" Then
PictureBox1.Image.Save(spath & ".jpg", ImageMagick.MagickFormat.Jpg)