Skip to content

[Update] Pipes and Filters sample refresh - #537

Merged
Chad Kittel (ckittel) merged 5 commits into
Azure-Samples:mainfrom
v-federicoar:refresh/pipes-and-filters
Jun 18, 2026
Merged

Chad Kittel (ckittel) merged 5 commits into
Azure-Samples:mainfrom
v-federicoar:refresh/pipes-and-filters

Conversation

@v-federicoar

@v-federicoar Federico Arambarri (CLARIUS CONSULTING SA) (v-federicoar) commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates the pipes-and-filters sample to keep the implementation current while preserving behavior.

What changed

  • Replaced SixLabors.ImageSharp with SkiaSharp (MIT license) for image processing in Resize.cs and Watermark.cs.
  • Added SkiaSharp and SkiaSharp.NativeAssets.Linux.NoDependencies packages.
  • Simplified Program.cs by removing the IFileProvider / ManifestEmbeddedFileProvider registration (no longer needed).
  • Changed resources/watermark.png from 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

  • Built the updated Functions project successfully.
  • Tested the example end-to-end:
    • Uploaded source image to blob storage.
    • Triggered pipeline via queue message.
    • Observed Resize, Watermark, and PublishFinal filters execute in sequence.
    • Confirmed processed image output is resized to 600px max and has a watermark overlay.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.ImageSharp with SkiaSharp for image resize and watermark operations, including added validation, error handling, and SkiaSharp-specific stream buffering.
  • Removed IFileProvider/ManifestEmbeddedFileProvider infrastructure (DI registration, package, csproj settings) in favor of loading the watermark from the output directory via Path.Combine.
  • Updated the Azure Storage account Bicep API version from 2025-06-01 to 2026-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.

Comment thread pipes-and-filters/ImageProcessingPipeline/Resize.cs
Comment thread pipes-and-filters/ImageProcessingPipeline/Watermark.cs
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@ckittel Chad Kittel (ckittel) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good conversion choice, IMO. Just one style question, but the rest looks good from my perspective.

Comment thread pipes-and-filters/ImageProcessingPipeline/Resize.cs Outdated
Comment thread pipes-and-filters/ImageProcessingPipeline/Watermark.cs

@ckittel Chad Kittel (ckittel) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@ckittel
Chad Kittel (ckittel) merged commit d167970 into Azure-Samples:main Jun 18, 2026
1 check passed
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.

3 participants