CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2014
    Posts
    2

    [VB.NET 2012] [HELP] ImageMagick Image Converter

    First of all, sorry for bad English.
    I'm using ImageMagick library for .NET (http://www.imagemagick.org/script/index.php) to create simple Multi-Image Converter. Only reason because i'm using this library is because i'm not happy with format support; System.Drawing.Imaging.Imageformat supports only few formats while ImageMagick supports about 100 formats. Now the problem:
    Code:
    Value of type 'ImageMagick.MagickFormat' cannot be converted to 'System.Drawing.Imaging.ImageFormat'.
    This is conversation code:
    Code:
     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)
    Can someone help me please with this problem?

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: [VB.NET 2012] [HELP] ImageMagick Image Converter

    Explain what you are trying to do? Looks like a Grid with file names...
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jan 2014
    Posts
    2

    Re: [VB.NET 2012] [HELP] ImageMagick Image Converter

    I'm trying to create multi-image converter and i'm using ImageMagick.NET library. When I click on conversation button, application converts every image from DataGridView to folder that I select. To be more specific I posted a screenshot (once again sorry for bad English) :
    Name:  Untitled.png
Views: 1281
Size:  51.1 KB

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: [VB.NET 2012] [HELP] ImageMagick Image Converter

    You have no Filename, Size or Extension's listed in the box, and your statements seem to indicate that everything works fine. What's the problem?
    You probably should be contacting the author(s) that know about their program. I don't have any idea how to help.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Mar 2014
    Posts
    6

    Re: [VB.NET 2012] [HELP] ImageMagick Image Converter

    I think you can receive a better solution by posting your image converting issue in ImageMagick support forum cuz not so many people are familar with this library.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured