{"record":{"id":"3778fdbc56cd62e9","repo":"stride3d/stride","slug":"this-file-format-is-not-yet-implemented","errorCode":null,"errorMessage":"This file format is not yet implemented.","messagePattern":"This file format is not yet implemented\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Foundation/Graphics/Image.cs","lineNumber":749,"sourceCode":"        /// Saves this instance to a stream.\n        /// </summary>\n        /// <param name=\"pixelBuffers\">The buffers to save.</param>\n        /// <param name=\"count\">The number of buffers to save.</param>\n        /// <param name=\"description\">Global description of the buffer.</param>\n        /// <param name=\"imageStream\">The destination stream.</param>\n        /// <param name=\"fileType\">Specify the output format.</param>\n        /// <remarks>This method support the following format: <c>dds, bmp, jpg, png, gif, tiff, wmp, tga</c>.</remarks>\n        internal static void Save(PixelBuffer[] pixelBuffers, int count, ImageDescription description, Stream imageStream, ImageFileType fileType)\n        {\n            foreach (var loadSaveDelegate in loadSaveDelegates)\n            {\n                if (loadSaveDelegate.FileType == fileType)\n                {\n                    loadSaveDelegate.Save(pixelBuffers, count, description, imageStream);\n                    return;\n                }\n            }\n            throw new NotSupportedException(\"This file format is not yet implemented.\");\n        }\n\n        static Image()\n        {\n            Register(ImageFileType.Stride, ImageHelper.LoadFromMemory, ImageHelper.SaveFromMemory);\n            Register(ImageFileType.Dds, DDSHelper.LoadFromDDSMemory, DDSHelper.SaveToDDSStream);\n            Register(ImageFileType.Gif, StandardImageHelper.LoadFromMemory, StandardImageHelper.SaveGifFromMemory);\n            Register(ImageFileType.Tiff, StandardImageHelper.LoadFromMemory, StandardImageHelper.SaveTiffFromMemory);\n            Register(ImageFileType.Bmp, StandardImageHelper.LoadFromMemory, StandardImageHelper.SaveBmpFromMemory);\n            Register(ImageFileType.Jpg, StandardImageHelper.LoadFromMemory, StandardImageHelper.SaveJpgFromMemory);\n            Register(ImageFileType.Png, StandardImageHelper.LoadFromMemory, StandardImageHelper.SavePngFromMemory);\n        }\n\n        internal unsafe void Initialize(ImageDescription description, IntPtr dataPointer, int offset, GCHandle? handle, bool bufferIsDisposable, PitchFlags pitchFlags = PitchFlags.None, int rowStride = 0)\n        {\n            if (!description.Format.IsValid || description.Format.IsVideoFormat)\n                throw new InvalidOperationException(\"Unsupported DXGI Format\");\n","sourceCodeStart":731,"sourceCodeEnd":767,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Foundation/Graphics/Image.cs#L731-L767","documentation":"Image.Save walks the registered load/save delegates for the requested ImageFileType; if no delegate is registered for that file type it throws NotSupportedException('This file format is not yet implemented'). Only formats registered in the static constructor (Stride, DDS, GIF, etc.) are savable.","triggerScenarios":"Calling image.Save(stream, ImageFileType.X) where X has no registered saver — e.g. requesting JPG/EXR saving when only a loader (or nothing) is registered for that type.","commonSituations":"Trying to save screenshots/textures as JPEG or TGA when the engine build lacks a saver; code written against a different engine version that supported the format; typos mapping a UI file filter to an unsupported ImageFileType.","solutions":["Save in a supported format instead (e.g. ImageFileType.Dds or the Stride native format) and convert externally","Check Image.Register calls / static constructor to see which formats have savers","Register a custom saver via Image.Register for the desired file type"],"exampleFix":"// before\nimage.Save(stream, ImageFileType.Jpg);\n// after\nimage.Save(stream, ImageFileType.Dds); // then convert with an external tool\n","handlingStrategy":"try-catch","validationCode":"// only offer save formats known to have registered savers (Stride, DDS, ...)\nstatic readonly HashSet<ImageFileType> Savable = new() { ImageFileType.Stride, ImageFileType.Dds };","typeGuard":"bool CanSave(ImageFileType t) => t is ImageFileType.Stride or ImageFileType.Dds;","tryCatchPattern":"try { image.Save(stream, fileType); }\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"not yet implemented\"))\n{ // fall back to a savable format\n  image.Save(stream, ImageFileType.Dds); }","preventionTips":["Consult the registered formats in Image's static constructor before choosing a save type","Convert to unsupported targets (JPG, PNG-in-old-versions) via an external tool after saving in DDS/Stride format","Register custom savers with Image.Register when a format is required"],"tags":["csharp","stride","graphics","image-saving","unsupported-format"],"backgroundTag":"unsupported-operation","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}