Skip to content

Commit

Permalink
Fix the ImageExtraction sample's output file extension
Browse files Browse the repository at this point in the history
- Also, add some debugging code to list files to the workflow file.
  • Loading branch information
datalogics-saharay committed Mar 13, 2024
1 parent 51c22c4 commit 0a2d5ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test-dotnet-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,13 @@ 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"
ls ${{matrix.dir}}
4 changes: 2 additions & 2 deletions Images/ImageExtraction/ImageExtraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit 0a2d5ed

Please sign in to comment.