-
Notifications
You must be signed in to change notification settings - Fork 14
Enhance DocumentAssembler image handling with sizing, alignment, fallbacks, and comprehensive tests #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4 to 5. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](actions/setup-dotnet@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@v9...v10) --- updated-dependencies: - dependency-name: actions/stale dependency-version: '10' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
--- updated-dependencies: - dependency-name: System.Configuration.ConfigurationManager dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…e installed on dev machine)
--- updated-dependencies: - dependency-name: SkiaSharp dependency-version: 3.119.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
--- updated-dependencies: - dependency-name: SkiaSharp.NativeAssets.Linux.NoDependencies dependency-version: 3.119.1 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: SkiaSharp.NativeAssets.Linux.NoDependencies dependency-version: 3.119.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
--- updated-dependencies: - dependency-name: SkiaSharp.NativeAssets.Linux.NoDependencies dependency-version: 3.119.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Upgraded several NuGet package versions in both OpenXmlPowerTools and test projects for improved compatibility and analyzer support. Added new PNG diff expectation files for various test cases to the TestFiles directory.
Migrated font metric logic from SixLabors.Fonts to SkiaSharp across the codebase for improved cross-platform compatibility. Added a new FontStyle enum, updated font family and style handling, and removed the SixLabors.Fonts dependency from the project file.
Upgraded DocumentFormat.OpenXml package to version 3.3.0. Updated PowerToolsBlockExtensionsTests to reflect new SDK behavior, where changes made through PowerTools are immediately visible to strongly-typed classes.
The GitHub Actions workflow for dotnet will no longer run on pull request events, only on push events. This simplifies workflow execution and may reduce unnecessary CI runs.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
--- updated-dependencies: - dependency-name: System.Configuration.ConfigurationManager dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: stesee <168659+stesee@users.noreply.github.com>
…icit sizing and alignment metadata (Align, Width, Height, MaxWidth, MaxHeight). - Added robust dimension parsing (px/pt/cm/mm/in/emu), aspect-ratio preservation, and per-paragraph justification output. - Introduced fallback decoders for PNG/JPEG/GIF headers when SkiaSharp cannot read an image, improving resilience to malformed data. - Delivered extensive unit-test coverage for base64 errors, optional placeholders, width/height scaling, combined max constraints, alignment behaviors, and truncated image streams (over 90 % of new logic). - Shipped a new DocumentAssembler04 sample that demonstrates multiple image alignments and resizing scenarios, plus refreshed documentation (DOCUMENT_ASSEMBLER.md).
|
I have read the CLA Document and I hereby sign the CLA 1 out of 3 committers have signed the CLA. |
| } | ||
| catch | ||
| { | ||
| // ignore and fall back to header-based detection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can SkiaSharp ever fail to parse a valid image? If not, I recommend failing fast and returning an error here instead of trying to render invalid images — that keeps failures visible and avoids silent corruption.
Introduce helper utilities to compute unique image IDs, format justification values, and reuse paragraph extraction logic in tests.
Tests