MagickNet PDFs to JPG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
lokelo

MagickNet PDFs to JPG

Post by lokelo »

Can MagickNet convert PDFs to JPG? I have the following:

Code: Select all

    Public Sub main()
        Try

            Dim img As Image

            img = New Image("C:\test\magick\test1.pdf")
            img.Compression = CompressionType.JPEGCompression
            img.Quality = 100
            img.Write("C:\test\magick\test1.jpg")
        Catch ex As Exception
            ex.ToString()
        End Try
    End Sub
and get the exception

"MagickNet.MagickError: ImageMagick:Empty JPEG image (DNL not supported) `C:\test\magick\test1.jpg'
at MagickNet.MagickException.Throw()
at MagickNet.MagickException.Throw(Object source, _Image* image)
at MagickNet.MagickException.Throw(Image image)
at MagickNet.Image.Write(String imageSpec)
at tester.main() in C:\Documents and Settings\rshields\My Documents\Visual Studio 2008\Projects\IMC Imaging\IMC Imaging\tester.vb:line 11"

Any Ideas?

Converting to a TIF creates the file, but i'm unable to open with any imaging software I have. "The document's format is invalid or not supported"
Post Reply