More Profile Image Sizing Fixes

This commit is contained in:
Alan Moon 2025-07-11 12:28:22 -07:00
parent 217e3f301a
commit ffa44ff036
2 changed files with 5 additions and 8 deletions

View File

@ -55,7 +55,7 @@
pbUserPfp.Location = new Point(13, 11);
pbUserPfp.Name = "pbUserPfp";
pbUserPfp.Size = new Size(128, 128);
pbUserPfp.SizeMode = PictureBoxSizeMode.Zoom;
pbUserPfp.SizeMode = PictureBoxSizeMode.StretchImage;
pbUserPfp.TabIndex = 2;
pbUserPfp.TabStop = false;
//

View File

@ -18,6 +18,7 @@ using QtCNETAPI.Schema;
using System.Diagnostics;
using System.Drawing.Imaging;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
namespace qtc_net_client_2.Forms
{
@ -53,11 +54,7 @@ namespace qtc_net_client_2.Forms
{
using (var ms = new MemoryStream(pfpRes.Data))
{
Bitmap bmp = new Bitmap(ms);
if (bmp.Width != 128 && bmp.Height != 128)
bmp.SetResolution(128, 128);
pbUserPfp.Image = bmp;
pbUserPfp.Image = new Bitmap(ms);
}
}