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
I cannot explain why your second example is not working. I made a fix in ImageMagick to print a better error message. You should try again after the next release that will be published this week.

You can also rewrite your first example. MagickImage contains a method called ToBase64 and you should set the Density before loading your image:
MagickReadSettings settings = new MagickReadSettings();
settings.Density = new MagickGeometry(400, 400);
using(MagickImage image = new MagickImage(file.InputStream, settings)
{
   image.Format = MagickFormat.Jpeg;
   imgString = image.ToBase64();
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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