diff --git a/src/Titano.Core/Video/Managed/ManagedSessions.cs b/src/Titano.Core/Video/Managed/ManagedSessions.cs index da797ac2..d46a8e5d 100644 --- a/src/Titano.Core/Video/Managed/ManagedSessions.cs +++ b/src/Titano.Core/Video/Managed/ManagedSessions.cs @@ -264,7 +264,8 @@ internal sealed class ImageSequenceSession : ManagedSession VideoCodec.JpegSequence => JpegEncoder.Encode(frame, JpegOptions(Settings.Quality)), VideoCodec.PngSequence => PngEncoder.Encode(frame, Settings.BitDepth == 16 ? 16 : 8, CompressionLevel.Optimal), VideoCodec.Tiff16Sequence => TiffWriter.Write(frame, new TiffWriteOptions { BitsPerSample = Settings.BitDepth == 8 ? 8 : 16 }), - VideoCodec.LinearDngSequence => LinearDngWriter.Write(frame), + // Tiles no larger than the frame: edge padding of a 256-pixel tile would dominate small outputs. + VideoCodec.LinearDngSequence => LinearDngWriter.Write(frame, new LinearDngOptions { TileSize = int.Clamp((int.Max(frame.Width, frame.Height) + 15) / 16 * 16, 16, 256) }), _ => throw new NotSupportedException($"{Settings.Codec} is not an image sequence"), }; }