Skip to content

Fix issue where PictureBox image from a URL was getting truncated.#115

Merged
jpobst merged 2 commits intomainfrom
picturebox-fix
Apr 3, 2026
Merged

Fix issue where PictureBox image from a URL was getting truncated.#115
jpobst merged 2 commits intomainfrom
picturebox-fix

Conversation

@jpobst
Copy link
Copy Markdown
Collaborator

@jpobst jpobst commented Apr 3, 2026

This PR addresses an issue where PictureBox images loaded from a URL could render truncated, and aligns some error-state rendering with DPI/padding behavior in the UI rendering layer.

Changes:

  • Load remote images by downloading the full response payload (GetByteArrayAsync) before decoding via SKBitmap.Decode.
  • Update the error “X” glyph rendering in PictureBoxRenderer to use padded client sizing and DPI-scaled stroke width.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses an issue where PictureBox images loaded from a URL could render truncated, and aligns some error-state rendering with DPI/padding behavior in the UI rendering layer.

Changes:

  • Load remote images by downloading the full response payload (GetByteArrayAsync) before decoding via SKBitmap.Decode.
  • Update the error “X” glyph rendering in PictureBoxRenderer to use padded client sizing and DPI-scaled stroke width.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Modern.Forms/PictureBox.cs Switches URL image loading to byte-array download before decoding to avoid truncation issues from streaming.
src/Modern.Forms/Renderers/PictureBoxRenderer.cs Updates error glyph rendering to use PaddedClientRectangle dimensions and DPI-scaled thickness.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Modern.Forms/Renderers/PictureBoxRenderer.cs Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jpobst jpobst merged commit 467e029 into main Apr 3, 2026
3 checks passed
@jpobst jpobst deleted the picturebox-fix branch April 3, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants