From acf45d42a4b6e4ac1aa5698668447cfa14810146 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Wed, 13 Mar 2024 14:08:01 -0500 Subject: [PATCH] Fix the ImageExtraction sample's output file extension - Also, add some debugging code to list files to the workflow file. --- .github/workflows/test-dotnet-samples.yml | 9 +++++++++ Images/ImageExtraction/ImageExtraction.cs | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-dotnet-samples.yml b/.github/workflows/test-dotnet-samples.yml index 375d067..f9011f9 100644 --- a/.github/workflows/test-dotnet-samples.yml +++ b/.github/workflows/test-dotnet-samples.yml @@ -183,3 +183,12 @@ jobs: ${{matrix.dir}}*.gif ${{matrix.dir}}*.json ${{matrix.dir}}*.txt + ${{matrix.dir}}*.csv + - name: List files again + run: | + ls -la .. + echo "Test" + ls -la ../.. + echo "Test2" + ls -la ../../../ + echo "Test3" diff --git a/Images/ImageExtraction/ImageExtraction.cs b/Images/ImageExtraction/ImageExtraction.cs index 1e144bd..34aaca4 100644 --- a/Images/ImageExtraction/ImageExtraction.cs +++ b/Images/ImageExtraction/ImageExtraction.cs @@ -32,14 +32,14 @@ static void ExtractImages(Content content) Datalogics.PDFL.Image img = (Datalogics.PDFL.Image)e; using (SKBitmap sKBitmap = img.SKBitmap) { - using (FileStream f = File.OpenWrite("ImageExtraction-extract-out" + (next) + ".Png")) + using (FileStream f = File.OpenWrite("ImageExtraction-extract-out" + (next) + ".png")) sKBitmap.Encode(SKEncodedImageFormat.Png, 100).SaveTo(f); } Datalogics.PDFL.Image newimg = img.ChangeResolution(500); using (SKBitmap sKBitmap = newimg.SKBitmap) { - using (FileStream f = File.OpenWrite("ImageExtraction-extract-Resolution-500-out" + (next) + ".Png")) + using (FileStream f = File.OpenWrite("ImageExtraction-extract-Resolution-500-out" + (next) + ".png")) sKBitmap.Encode(SKEncodedImageFormat.Png, 100).SaveTo(f); } next++;