Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Build and Release

on:
push:
tags:
- 'version-*'
workflow_dispatch:
push:
branches: ["*"]
tags: ["version-*"]
pull_request:
types: [opened, synchronize, reopened]

env:
PROJECT_PATH: CollimationCircles/CollimationCircles.csproj
FRAMEWORK: net10.0
APP_NAME: CollimationCircles
DOTNET_VERSION: '10.0.x'
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
DOTNET_VERSION: "10.0.x"
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
build:
Expand Down Expand Up @@ -140,7 +142,7 @@ jobs:
APP="${{ env.APP_NAME }}"
BUNDLE="$APP.app"
CP="./publish/${RID}_bundle/$BUNDLE/Contents"

mkdir -p "$CP/MacOS"
mkdir -p "$CP/Resources"

Expand All @@ -161,7 +163,7 @@ jobs:
cp -R "./publish/$RID/"* "$CP/MacOS/"
[ -f "$CP/MacOS/icon.icns" ] && mv "$CP/MacOS/icon.icns" "$CP/Resources/"
chmod +x "$CP/MacOS/$APP"

TAR_NAME="./publish/${{ matrix.index }}-$APP-$VER-$RID.tar.gz"
tar -czf "$TAR_NAME" -C "./publish/${RID}_bundle" "$BUNDLE"

Expand Down
15 changes: 8 additions & 7 deletions CollimationCircles/CollimationCircles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,28 @@
<!-- Cross-platform packages -->
<ItemGroup>
<PackageReference Include="LibVLCSharp.Avalonia" Version="3.10.0" />
<PackageReference Include="OpenCvSharp4" Version="4.13.0.20260602" />
<PackageReference Include="OpenCvSharp4.Extensions" Version="4.13.0.20260602" />
<PackageReference Include="OpenCvSharp4" Version="4.13.0.20260627" />
<PackageReference Include="OpenCvSharp4.Extensions" Version="4.13.0.20260627" />
</ItemGroup>

<!-- Windows platform packages (win-x64, win-arm64) -->
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'win-x64' Or '$(RuntimeIdentifier)' == 'win-arm64' Or '$(RuntimeIdentifier)' == ''">
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.23.1" />
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.13.0.20260602" Condition="'$(RuntimeIdentifier)' != 'win-arm64'" />
<PackageReference Include="OpenCvSharp4.runtime.win-arm64" Version="4.13.0.20260528" Condition="'$(RuntimeIdentifier)' == 'win-arm64'" />
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.13.0.20260627" Condition="'$(RuntimeIdentifier)' != 'win-arm64'" />
<PackageReference Include="OpenCvSharp4.runtime.win-arm64" Version="4.13.0.20260627" Condition="'$(RuntimeIdentifier)' == 'win-arm64'" />
</ItemGroup>

<!-- Linux platform packages (linux-x64, linux-arm64) -->
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64' Or '$(RuntimeIdentifier)' == 'linux-arm64'">
<PackageReference Include="OpenCvSharp4.official.runtime.linux-x64" Version="4.13.0.20260528" Condition="'$(RuntimeIdentifier)' == 'linux-x64'" />
<PackageReference Include="OpenCvSharp4.runtime.linux-arm64" Version="4.13.0.20260528" Condition="'$(RuntimeIdentifier)' == 'linux-arm64'" />
<PackageReference Include="OpenCvSharp4.official.runtime.linux-x64" Version="4.13.0.20260627" Condition="'$(RuntimeIdentifier)' == 'linux-x64'" />
<PackageReference Include="OpenCvSharp4.runtime.linux-arm64" Version="4.13.0.20260627" Condition="'$(RuntimeIdentifier)' == 'linux-arm64'" />
</ItemGroup>

<!-- macOS platform packages (osx-x64, osx-arm64) -->
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'osx-x64' Or '$(RuntimeIdentifier)' == 'osx-arm64'">
<PackageReference Include="VideoLAN.LibVLC.Mac" Version="3.1.3.1" />
<PackageReference Include="OpenCvSharp4.runtime.osx" Version="4.13.0.20260528" />
<PackageReference Include="OpenCvSharp4.runtime.osx.x64" Version="4.13.0.20260627" Condition="'$(RuntimeIdentifier)' == 'osx-x64'" />
<PackageReference Include="OpenCvSharp4.runtime.osx.arm64" Version="4.13.0.20260627" Condition="'$(RuntimeIdentifier)' == 'osx-arm64'" />
</ItemGroup>

<!-- ZWO ASI Camera SDK Libraries -->
Expand Down
4 changes: 2 additions & 2 deletions CollimationCircles/CollimationCircles.net6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="Octokit" Version="10.0.0" />
<PackageReference Include="OpenCvSharp4" Version="4.9.0.20240103" />
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.9.0.20240103" />
<PackageReference Include="OpenCvSharp4" Version="4.13.0.20260627" />
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.13.0.20260627" />

<PackageReference Condition="$(RuntimeIdentifier.StartsWith('win')) And '$(Configuration)' == 'Release'" Include="VideoLAN.LibVLC.Windows" Version="3.0.20" />
<PackageReference Condition="$(RuntimeIdentifier.StartsWith('osx')) And '$(Configuration)' == 'Release'" Include="VideoLAN.LibVLC.Mac" Version="3.1.3.1" />
Expand Down
4 changes: 3 additions & 1 deletion CollimationCircles/Services/ZWOLiveStreamService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ private void CaptureLoop(CancellationToken ct)

private static byte[] EncodeGrayscaleToJpeg(byte[] rawY8, int width, int height)
{
using var image = new MagickImage(rawY8, new PixelReadSettings((uint)width, (uint)height, StorageType.Char, PixelMapping.RGB));
// ZWO delivers Y8 data: one byte per pixel. Read it as a single
// channel ("R") instead of RGB (which would expect 3 bytes/pixel).
using var image = new MagickImage(rawY8, new PixelReadSettings((uint)width, (uint)height, StorageType.Char, "R"));
image.ColorSpace = ColorSpace.Gray;
image.Format = MagickFormat.Jpeg;
image.Quality = 80;
Expand Down
Loading