Compare commits
No commits in common. "main" and "v0.1.0-beta" have entirely different histories.
main
...
v0.1.0-bet
@ -71,7 +71,7 @@ namespace Cupola
|
||||
ReadWriteTexture2D<Bgra32, Float4> brightest = images[0];
|
||||
ReadWriteTexture2D<Bgra32, Float4> output = images[0];
|
||||
|
||||
outputImages[0] = images[0];
|
||||
outputImages[0] = output;
|
||||
|
||||
for (int i = 1; i < images.Length; i++)
|
||||
{
|
||||
|
@ -5,11 +5,6 @@
|
||||
<TargetFramework>net7.0-windows10.0.17763.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<IncludeSymbols>True</IncludeSymbols>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<Title>Cupola</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -18,11 +13,4 @@
|
||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="LICENSE">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 AUnicornWithNoLife
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
21
LICENSE
21
LICENSE
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 AUnicornWithNoLife
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -7,14 +7,28 @@
|
||||
mc:Ignorable="d"
|
||||
Title="Tranquility" Height="450" Width="539">
|
||||
<Grid>
|
||||
<Button x:Name="Load" Content="Load" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="35" Width="65" Click="LoadFilesClick"/>
|
||||
<TextBox x:Name="Input_Folder" Margin="80,10,10,0" TextWrapping="Wrap" Text="INPUT FOLDER" VerticalAlignment="Top" Height="35" IsReadOnly="True"/>
|
||||
<TextBox x:Name="Input_Files" TextWrapping="Wrap" Text="INPUT FILES" Margin="10,50,10,50" IsReadOnly="True"/>
|
||||
<Button x:Name="Run" Content="Run" Click="RunOp" Margin="80,0,0,10" HorizontalAlignment="Left" Width="65" Height="35" VerticalAlignment="Bottom"/>
|
||||
<ProgressBar x:Name="Progress" Height="35" Margin="150,0,10,10" VerticalAlignment="Bottom"/>
|
||||
<ComboBox x:Name="Options" Margin="10,0,0,10" SelectedIndex="0" HorizontalAlignment="Left" Width="65" Height="35" VerticalAlignment="Bottom">
|
||||
<ListBoxItem x:Name="Picture_Option" Content="Picture" VerticalAlignment="Center"/>
|
||||
<ListBoxItem x:Name="Video_Option" Content="Video" VerticalAlignment="Center"/>
|
||||
</ComboBox>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid x:Name="Left" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" Height="NaN" Margin="0,0,0,0" VerticalAlignment="Stretch" Width="NaN">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="Load" Content="Load" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="35" Width="65" Click="LoadFilesClick"/>
|
||||
<TextBox x:Name="Input_Folder" Margin="80,10,10,0" TextWrapping="Wrap" Text="INPUT FOLDER" VerticalAlignment="Top" Height="35"/>
|
||||
<TextBox x:Name="Input_Files" TextWrapping="Wrap" Text="INPUT FILES" Margin="10,50,10,10"/>
|
||||
</Grid>
|
||||
<Grid x:Name="Right" Grid.ColumnSpan="2" Height="NaN" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="NaN">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="Run" Content="Run" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="35" Width="64" Grid.Column="1" Click="Run"/>
|
||||
<ProgressBar x:Name="Progress" Height="35" Margin="78,10,10,0" VerticalAlignment="Top" Grid.Column="1"/>
|
||||
<Image x:Name="Preview" Grid.Column="1" Margin="12,53,12,56"/>
|
||||
<Button x:Name="Save" Content="Save" Margin="10,0,10,10" Grid.Column="1" Height="35" VerticalAlignment="Bottom"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
@ -14,6 +14,7 @@ namespace Tranquility
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
string[]? files;
|
||||
ReadWriteTexture2D<Bgra32, float4>? finalImage;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
@ -49,58 +50,14 @@ namespace Tranquility
|
||||
return null;
|
||||
}
|
||||
|
||||
private void RunOp(object sender, RoutedEventArgs e)
|
||||
private void Run(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (files == null)
|
||||
throw new Exception("Please select files before running");
|
||||
|
||||
int opt; // 0 - Picture, 1 - Video
|
||||
|
||||
opt = Options.SelectedIndex;
|
||||
|
||||
Progress.Value = 10;
|
||||
|
||||
ReadWriteTexture2D<Bgra32, float4>[] images = Cupola.Cupola.Load(files);
|
||||
|
||||
Progress.Value = 30;
|
||||
|
||||
if (opt == 0)
|
||||
{
|
||||
ReadWriteTexture2D<Bgra32, float4> finalImage = Cupola.Cupola.RunSingle(images);
|
||||
|
||||
Progress.Value = 90;
|
||||
|
||||
CommonSaveFileDialog saveFileDialog = new CommonSaveFileDialog();
|
||||
saveFileDialog.DefaultExtension = ".jpg";
|
||||
saveFileDialog.EnsurePathExists = true;
|
||||
CommonFileDialogResult result = saveFileDialog.ShowDialog();
|
||||
|
||||
if (result != CommonFileDialogResult.Ok)
|
||||
throw new Exception("please set location valid OKAY");
|
||||
|
||||
finalImage.Save(saveFileDialog.FileName);
|
||||
|
||||
Progress.Value = 100;
|
||||
}
|
||||
else if (opt == 1)
|
||||
{
|
||||
ReadWriteTexture2D<Bgra32, float4>[] finalImages = Cupola.Cupola.RunMulti(images);
|
||||
|
||||
Progress.Value = 90;
|
||||
|
||||
string save = OpenFolder();
|
||||
|
||||
for (int i = 0; i < finalImages.Length; i++)
|
||||
{
|
||||
finalImages[i].Save(save + "\\" + i.ToString() + ".jpg");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("invalid option please die");
|
||||
}
|
||||
|
||||
|
||||
finalImage = Cupola.Cupola.RunSingle(images);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,4 @@
|
||||
|
||||
Generate long exposure images (or video) from a video
|
||||
|
||||
unfortunatly this only runs on windows, since computesharp utilizes the DirectX api (in theory you can run this under linux using wine + dxvk (i would recommend if you want to use this, launch it from steam with proton)) (also, if you want to run this under macOS, you will have to use the game porting toolkit, as it uses directX 12)
|
||||
|
||||
Cupola - API
|
||||
|
||||
Tranquility - WPF app to use Cupola with a nice GUI (tranquility is probably gonna be moved into a seperate repo at some point)
|
||||
unfortunatly this only runs on windows, since System.Drawing.Common only works on windows on .net 6
|
||||
|
Loading…
x
Reference in New Issue
Block a user