Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Convert PDF httpPostedFile to JPG Base64 AND save JPG on disk

$
0
0
On the same page, I need to convert the PDF to Base64 JPG AND save the JPG to disk

Code to convert to Base64 which works fine.
Using image As New MagickImage(file.InputStream)
    Using ms As New MemoryStream()
       image.Format = MagickFormat.Jpeg
       image.Density = 400
       image.Write(ms)
       imgString = ImageToBase64(Drawing.Image.FromStream(ms), System.Drawing.Imaging.ImageFormat.Jpeg)
    End Using
End Using
Convert same PDF httpPostedFile to a JPG and save on disk - NOT WORKING.
The code below gives me the error message:
An exception of type 'ImageMagick.MagickMissingDelegateErrorException' occurred in Magick.NET-x86.dll but was not handled in user code

Additional information: Magick: no decode delegate for this image format `' @ error/blob.c/BlobToImage/359
Using image1 As New MagickImage(file.InputStream)
     image1.Format = MagickFormat.Jpeg
     image1.Density = 400
     image1.Write(Server.MapPath("Scan/") & folderName & "/" & fileRecNumber & "_" & fileMonth & "_" & fileYear & "_" & imgId & ".jpg")
End Using

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>