| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The imaging layer preserves proportions only when exactly one decode dimension is set, and stretches to fit when both are. The loader set both whenever the caller supplied both, so asking for a size whose ratio differed from the source silently distorted the image. - Read the source dimensions from the image header, without decoding pixels, and set only the dimension that constrains the result so the other is derived. A source that cannot be measured falls back to the requested width rather than stretching. - Cover the choice of dimension, and add an end-to-end decode that fails if a request is applied in a way that distorts.
Every file under the folder targeted the Windows presentation stack and duplicated the folder that already compiles into the desktop targets. No item group referenced it, so it reached no target framework, and the types it declared could not serve any other one either. Its size and point converters still described themselves as Android conversions, which is where they were copied from.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1669 +/- ##
==========================================
+ Coverage 97.60% 97.98% +0.37%
==========================================
Files 127 127
Lines 6757 6785 +28
Branches 1025 1027 +2
==========================================
+ Hits 6595 6648 +53
+ Misses 91 64 -27
- Partials 71 73 +2 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
- Set the cache option before the resource identifier, so the image is read up front rather than on demand. Without it the loader held the caller's file open for as long as the bitmap lived. - Measure a resource through a stream the loader owns and closes, rather than handing the identifier to a decoder that keeps it open. A resource that is not a file is left unmeasured, and the decode is then constrained by width alone, which still preserves the proportions. - Cover the measuring, dimension-choosing and resource paths, including a request the source cannot fill, a header the codec cannot read and a resource that cannot be opened.
|
Sorry, something went wrong.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What kind of change does this PR introduce?
Bug fix, plus removal of dead code.
What is the new behavior?
What is the current behavior?
What might this PR break?
Checklist
Additional information
The new end-to-end test was confirmed to fail against the previous loader on Windows, reporting an aspect ratio of exactly 1 against the source's 1.0667. Verified on Windows across all seven desktop target frameworks (11,011 tests) and on Linux (6,228 tests).