Quantcast
Channel: magick Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1011

Commented Unassigned: Cannot load bitmap if BitmapData is empty [970]

$
0
0
Test:
var emptyBitmap = new Bitmap(100, 100, PixelFormat.Format24bppRgb);
var im = new MagickImage(emptyBitmap);

Result:
System.ArgumentNullException occurred
HResult=-2147467261
Message=Value cannot be null.
Parameter name: encoder
Source=System.Drawing
ParamName=encoder
StackTrace:
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
InnerException:

In MagickImage.cpp on line 2015.
Comments: ** Comment from web user: petersunde **

Another testcase:
var whiteBitmap = new Bitmap(100, 100, PixelFormat.Format24bppRgb);
using (var g = Graphics.FromImage(whiteBitmap))
{
g.FillRectangle(new SolidBrush(Color.White),
new Rectangle(0, 0, whiteBitmap.Width, whiteBitmap.Height));
}
new MagickImage(whiteBitmap);


Viewing all articles
Browse latest Browse all 1011

Trending Articles



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