[Update] Pipes and Filters sample refresh - #537
Chad Kittel (ckittel) merged 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the pipes-and-filters image processing sample from SixLabors.ImageSharp (which now requires a license key) to SkiaSharp (MIT-licensed), updating the Resize and Watermark Azure Functions accordingly. The embedded resource approach for the watermark file is replaced with a simpler file-copy-to-output pattern, and the Bicep infrastructure template gets an API version bump.
Changes:
- Replaced
SixLabors.ImageSharpwithSkiaSharpfor image resize and watermark operations, including added validation, error handling, and SkiaSharp-specific stream buffering. - Removed
IFileProvider/ManifestEmbeddedFileProviderinfrastructure (DI registration, package, csproj settings) in favor of loading the watermark from the output directory viaPath.Combine. - Updated the Azure Storage account Bicep API version from
2025-06-01to2026-04-01.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
ImageProcessingPipeline.csproj |
Swaps ImageSharp + embedded file provider packages for SkiaSharp; changes watermark from embedded resource to content file. |
Resize.cs |
Replaces ImageSharp resize logic with SkiaSharp; adds error handling try/catch and image validation. |
Watermark.cs |
Replaces ImageSharp watermark logic with SkiaSharp; loads watermark from disk instead of embedded resources; adds validation. |
Program.cs |
Removes IFileProvider DI registration and unused using directives. |
main.bicep |
Bumps Storage Account API version to 2026-04-01. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Chad Kittel (ckittel)
left a comment
There was a problem hiding this comment.
Good conversion choice, IMO. Just one style question, but the rest looks good from my perspective.
Chad Kittel (ckittel)
left a comment
There was a problem hiding this comment.
Thanks for jumping on this. I moved the AzDO workitem for this into the current sprint so you can close it out when wrapped up.
Summary
This PR updates the
pipes-and-filterssample to keep the implementation current while preserving behavior.What changed
SixLabors.ImageSharpwithSkiaSharp(MIT license) for image processing inResize.csandWatermark.cs.SkiaSharpandSkiaSharp.NativeAssets.Linux.NoDependenciespackages.Program.csby removing theIFileProvider/ManifestEmbeddedFileProviderregistration (no longer needed).resources/watermark.pngfrom an embedded resource to regular content copied to the output directory.Why
Starting with version 4.0, SixLabors.ImageSharp adopted a split license model that requires a commercial or community license key to build. The community license is free for open-source projects but expires periodically, requiring manual renewal. To avoid ongoing license maintenance in a sample repository, the image processing was migrated to SkiaSharp, which is MIT-licensed with no build-time license enforcement.
Addressing #513
Validation
Resize,Watermark, andPublishFinalfilters execute in sequence.