{"record":{"id":"112026d99a07923e","repo":"SubtitleEdit/subtitleedit","slug":"no-image-handler-for-format-options-format","errorCode":null,"errorMessage":"No image handler for format '{options.Format}'","messagePattern":"No image handler for format '(.+?)'","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/seconv/Core/SubtitleConverter.cs","lineNumber":569,"sourceCode":"            {\n                foreach (var item in items)\n                {\n                    item.Dispose();\n                }\n            }\n        }\n\n        await Task.CompletedTask;\n        return true;\n    }\n\n    private static void WritePreservedBitmaps(\n        IReadOnlyList<BitmapSubtitleLoader.BitmapSubtitleItem> items,\n        string outputFile,\n        ConversionOptions options)\n    {\n        var handler = ImageOutputWriter.TryCreateHandler(LibSEIntegration.NormalizeFormatName(options.Format))\n            ?? throw new InvalidOperationException($\"No image handler for format '{options.Format}'\");\n        var outputDir = Path.GetDirectoryName(outputFile);\n        if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir))\n        {\n            Directory.CreateDirectory(outputDir);\n        }\n        ImageOutputWriter.WritePreservedBitmaps(items, outputFile, handler, options);\n    }\n\n    private List<string> GetInputFiles(ConversionOptions options)\n    {\n        var files = new List<string>();\n\n        var baseFolder = string.IsNullOrEmpty(options.InputFolder)\n            ? Directory.GetCurrentDirectory()\n            : options.InputFolder;\n\n        foreach (var entry in options.Patterns)\n        {","sourceCodeStart":551,"sourceCodeEnd":587,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/seconv/Core/SubtitleConverter.cs#L551-L587","documentation":"Thrown by WritePreservedBitmaps when LibSEIntegration.NormalizeFormatName(options.Format) does not match any image-output handler. The bitmap-passthrough path can only re-emit into the image formats ImageOutputWriter.TryCreateHandler knows (Blu-ray sup, VobSub, BDN-XML, DOST, FCP, D-Cinema, images-with-time-codes, WebVTT thumbnail). A text-only format here is a CLI/usage error.","triggerScenarios":"A bitmap source (MKV PGS/VobSub or TS DVB-sub) is being preserved as-is, but options.Format normalizes to something TryCreateHandler returns null for (e.g. 'srt', 'ass', a typo, or an unsupported image format).","commonSituations":"Asking seconv to convert PGS bitmaps into 'srt' without OCR (no OCR engine configured), or passing an unrecognised format string. The passthrough path has no renderer for text.","solutions":["Use a supported image target: bluraysup, vobsub, bdnxml, dost, fcpimage, dcineterop, imageswithtimecodes, or webvttthumbnail.","If you actually want text, configure an OCR engine (--ocr-engine tesseract, etc.) so the text path runs instead of bitmap passthrough.","Check the format spelling against seconv's --help format list; NormalizeFormatName only accepts known aliases."],"exampleFix":"// before\nseconv movie.mkv srt            // bitmap track + text target with no OCR\n// after (image target)\nseconv movie.mkv bluraysup\n// or enable OCR\nseconv movie.mkv srt --ocr-engine tesseract","handlingStrategy":"type-guard","validationCode":"var handler = ImageOutputWriter.TryCreateHandler(LibSEIntegration.NormalizeFormatName(options.Format));\nif (handler is null && !HasOcrEngine(options))\n    throw new ArgException($\"'{options.Format}' is not a valid image target and no OCR engine is set.\");","typeGuard":"static readonly HashSet<string> ImageTargets = new(StringComparer.OrdinalIgnoreCase)\n{ \"bluraysup\",\"vobsub\",\"bdnxml\",\"bdnxml8bit\",\"dost\",\"fcpimage\",\"dcineterop\",\"dcineteroppng\",\"dcismpte2014\",\"imageswithtimecodes\",\"webvttthumbnail\" };\nstatic bool IsImageTarget(string fmt) => ImageTargets.Contains(LibSEIntegration.NormalizeFormatName(fmt).Trim());","tryCatchPattern":"null","preventionTips":["Cross-check the requested format against seconv's supported image list before scripting.","When converting bitmaps to text, always set --ocr-engine so the OCR path runs.","Normalise format aliases through LibSEIntegration.NormalizeFormatName to avoid typos."],"tags":["seconv","image-output","format-mismatch","ocr","argument-validation"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}