You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While looking into #499, I realised that the screenshot function saves the image in png format despite adding the .jpg file extension.
Unfortunately, I don't think fixing this won't help reduce file size for #499 because failure screenshots uses the returned byte array which is actually converted to jpg format.
Expected behavior
Should convert to jpg before saving the file. Or save with .png file extension.
Other information
OS: Windows 10
Browser: chrome
NETCore 3.1
canopy 2.1.5
Dotnet core screenshot actually fails when I use dotnet core. It saves the png format file (with .jpg extension) and then throws when trying to convert to jpg. Maybe I'm missing a paket reference or something.
System.PlatformNotSupportedException: System.Drawing is not supported on this platform.
at System.Drawing.Image.FromStream(Stream stream)
at canopy.parallell.functions.pngToJpg(Byte[] pngArray) in C:\projects\canopy\src\canopy\canopy.parallell.functions.fs:line 89
at <StartupCode$FSI_0013>.$FSI_0013.main@()
The text was updated successfully, but these errors were encountered:
I think my issue is related here from comparing the error messages. My script is here: https://gist.github.com/IvanRainbolt/42b8c0c7fe3742e741e40373582be86e
and my error message is this:
D:\OneDrive\T\canopy.experiment>fsi tryscreenshot.fsx
READY_
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port 65077
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
DevTools listening on ws://127.0.0.1:65080/devtools/browser/0185cedf-d3a3-49d7-a520-81494d7584b7
path: C:\Users\netaz\AppData\Roaming\canopy System.TypeLoadException: Could not load type 'System.MarshalByRefObject' from assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at canopy.parallell.functions.pngToJpg(Byte[] pngArray)
at <StartupCode$FSI_0001>.$FSI_0001.main@() in D:\OneDrive\T\canopy.experiment\tryscreenshot.fsx:line 46
Stopped due to error
D:\OneDrive\T\canopy.experiment>
Describe the bug
While looking into #499, I realised that the screenshot function saves the image in png format despite adding the
.jpg
file extension.canopy/src/canopy/canopy.parallell.functions.fs
Lines 52 to 99 in a593649
Unfortunately, I don't think fixing this won't help reduce file size for #499 because failure screenshots uses the returned byte array which is actually converted to jpg format.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should convert to jpg before saving the file. Or save with
.png
file extension.Other information
Dotnet core
screenshot
actually fails when I use dotnet core. It saves the png format file (with.jpg
extension) and then throws when trying to convert to jpg. Maybe I'm missing a paket reference or something.The text was updated successfully, but these errors were encountered: