Thus, on my site a user can create an avatar. It is created by the user by selecting multiple images; there is a basic "skin image" and png that overlap an image that depicts hair, eyes, mouth, etc.
I canβt save the user avatar in the project files, so the user avatar data is stored in the database, and png are superimposed on the fly and displayed to the user.
However, I would like the user to be able to upload his avatar as jpeg by going to the page.
I have this small example that works correctly:
protected void Page_Load (object sender, EventArgs e)
{
// User has skin1.png, eyes3.png, and mouth8.png
Bitmap bit = new Bitmap (System.Drawing.Image.FromFile (Server.MapPath ("/ images / skin1.png")), 80, 106);
Response.ContentType = "image / jpeg";
bit.Save (Response.OutputStream, ImageFormat.Jpeg);
}
But, as you can see, it only works for me for one image. I would like to create a bitmap from several png and output jpeg.
Can anyone help?
source share