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

New Post: Limit image formats on Magick.net

$
0
0
There is no way to set the allowed formats when reading an image. You can however disable formats by unregistering them:
foreach (var formatInfo in MagickNET.SupportedFormats)
{
  if (formatInfo.Format != MagickFormat.Jpeg &&
      formatInfo.Format != MagickFormat.Tiff &&
      formatInfo.Format != MagickFormat.Gif)
    formatInfo.Unregister();
}
When you do this you won't be able to read or write a .png file so I am not sure if this is what you want.

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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