Hi,
We have recently noticed an issue with logo images in JPG/JPEG format being cropped automatically when used in Stimul, despite there being no changes to the image settings.
For now, we found that converting the same images to PNG solves the problem, as the logos are then displayed normally without any unwanted cropping.
Has anyone experienced a similar issue with JPG or JPEG images in Stimul? I’d like to understand what could be causing this behavior and whether there is a way to prevent the cropping without having to convert the files to PNG.
JPG Images Are Being Cropped Automatically
-
briplowou7
- Posts: 1
- Joined: Tue Sep 15, 2026 7:51 am
-
Lech Kulikowski
- Posts: 7857
- Joined: Tue Mar 20, 2018 5:34 am
Re: JPG Images Are Being Cropped Automatically
Hello,
JPG/JPEG logos appear cropped due to a known Windows 11 24H2 regression in the GDI+/WIC JPEG decoder that .NET's System.Drawing relies on — it miscalculates image dimensions/stride, so only a fragment (often the top-left portion) renders, and it also corrupts EXIF orientation reads.
PNG is unaffected because it decodes through a different codepath, which is why converting to PNG "fixes" it without addressing the root cause.
Microsoft's own .NET team has tagged this an external OS issue, meaning it affects any .NET app using GDI+ for JPEG. Besides converting to PNG, viable workarounds include stripping EXIF metadata (`exiftool -all=`), re-encoding the JPEG with a different tool, or updating Windows to a build with Microsoft's cumulative fixes.
Bug tracker references:
- [dotnet/winforms #12339 — Saving JPEG as PNG via System.Drawing.Bitmap broken on Win11 24H2](https://github.com/dotnet/winforms/issues/12339)
- [dotnet/winforms #12338 — EXIF data misreading on Win11 24H2](https://github.com/dotnet/winforms/issues/12338)
- [dotnet/winforms #12910 — GDI+ rendering bug on Win11 24H2](https://github.com/dotnet/winforms/issues/12910)
Thank you.
JPG/JPEG logos appear cropped due to a known Windows 11 24H2 regression in the GDI+/WIC JPEG decoder that .NET's System.Drawing relies on — it miscalculates image dimensions/stride, so only a fragment (often the top-left portion) renders, and it also corrupts EXIF orientation reads.
PNG is unaffected because it decodes through a different codepath, which is why converting to PNG "fixes" it without addressing the root cause.
Microsoft's own .NET team has tagged this an external OS issue, meaning it affects any .NET app using GDI+ for JPEG. Besides converting to PNG, viable workarounds include stripping EXIF metadata (`exiftool -all=`), re-encoding the JPEG with a different tool, or updating Windows to a build with Microsoft's cumulative fixes.
Bug tracker references:
- [dotnet/winforms #12339 — Saving JPEG as PNG via System.Drawing.Bitmap broken on Win11 24H2](https://github.com/dotnet/winforms/issues/12339)
- [dotnet/winforms #12338 — EXIF data misreading on Win11 24H2](https://github.com/dotnet/winforms/issues/12338)
- [dotnet/winforms #12910 — GDI+ rendering bug on Win11 24H2](https://github.com/dotnet/winforms/issues/12910)
Thank you.