Hi 
I have just reopened an old Monogame, windows- project, to continue working with it.
For some reason I can no longer run the project.
The line:
Texture2D texture = Texture2D.FromStream(Game1.CurrentGraphicsDevice, memoryStream);
fails with the message:"This image format is not supported".
It does this with PNG, GIF, JPG, so I am convinced it has nothing to do with the internal image format.
The inner exception is from MonoGame.Utilities.ImageReader.Read and states: "unknown image type".
On my machine, this minimal project can reproduce the problem. Can anyone confirm that it is a general problem, or just my setup?
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Drawing;
using System.IO;
namespace Game1
{
public class Game1 : Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
using (var stream = new System.IO.FileStream("c:\\temp\\test.jpg", FileMode.Open))
{
using (Bitmap img = (Bitmap)Bitmap.FromStream(stream))
{
var texture = Texture2D.FromStream(GraphicsDevice, stream);
}
}
}
}
}
Kind regards - Jakob