feat(editor): visual crop, rotate/mirror/flip/straighten, colour looks (owner review 1 phase 4) (#26)
CI / Build and test (push) Successful in 8m19s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 12m9s
CI / PostgreSQL 16 integration (push) Successful in 7m49s
CI / PostgreSQL 17 integration (push) Successful in 7m19s
CI / Docker image (push) Successful in 46s
Release / Server image (push) Successful in 1m14s

Owner review 1 R5 + R6. Camera rotation, mirror, flip, straighten and crop handles locked to the output; an Exposure Look group; Export output size ("proportions win"); settings format 2 with older-node gates. Also fixes project text and hashes differing between Windows and Linux.

Closes #19
Closes #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #26.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-11-05 01:09:09 +01:00
1 parent db389a54f2
commit 188b2c2e55
355 files changed
+10549 -1061

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
using Chronos.Core.Export;
using Chronos.Core.Project;
namespace Chronos.Core.Render;
/// <summary>
/// What a render needs of the program that runs it (owner review 1, phase 4): the settings format a render node or server
/// must read to render a job as this Chronos would. Computed for routing and gating only, never written into the settings.
/// </summary>
public static class RenderRules
{
/// <summary>
/// The settings format a render of <paramref name="settings"/> with <paramref name="export"/> on a source of the given
/// (Exif-oriented) size needs: the format the settings are written in (<see cref="ProjectSettings.WrittenFormat"/>), and
/// at least 2 when the chosen proportions change a fixed-size preset's size (<see cref="RenderSize"/>), which a format-1
/// program would render at the preset's own ratio.
/// </summary>
public static int RequiredFormat(ProjectSettings settings, ResolvedExport export, int sourceWidth, int sourceHeight)
{
ArgumentNullException.ThrowIfNull(settings);
ArgumentNullException.ThrowIfNull(export);
var format = settings.WrittenFormat;
if (export.Width > 0 && export.Height > 0 && sourceWidth > 0 && sourceHeight > 0 && !RenderSize.IsSource(settings.Camera)
&& RenderSize.Of(settings.Camera, export, sourceWidth, sourceHeight) != PresetSize(export))
format = int.Max(format, 2);
return format;
}
/// <summary>A fixed-size preset's size as a format-1 program renders it (even for codecs that are not managed).</summary>
private static (int Width, int Height) PresetSize(ResolvedExport export) =>
RenderSize.Of(new CameraSettings(), export, 1, 1);
}