stride3d/stride · error · NotSupportedException

This file format is not yet implemented.

Error message

This file format is not yet implemented.

What it means

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.

Solutions

  1. Save in a supported format instead (e.g. ImageFileType.Dds or the Stride native format) and convert externally
  2. Check Image.Register calls / static constructor to see which formats have savers
  3. Register a custom saver via Image.Register for the desired file type

Example fix

// before
image.Save(stream, ImageFileType.Jpg);
// after
image.Save(stream, ImageFileType.Dds); // then convert with an external tool
Defensive patterns

Strategy: try-catch

Validate before calling

// only offer save formats known to have registered savers (Stride, DDS, ...)
static readonly HashSet<ImageFileType> Savable = new() { ImageFileType.Stride, ImageFileType.Dds };

Type guard

bool CanSave(ImageFileType t) => t is ImageFileType.Stride or ImageFileType.Dds;

Try / catch

try { image.Save(stream, fileType); }
catch (NotSupportedException ex) when (ex.Message.Contains("not yet implemented"))
{ // fall back to a savable format
  image.Save(stream, ImageFileType.Dds); }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14). Data as JSON: /api/errors/3778fdbc56cd62e9. Report an issue: GitHub.

Appendix: source

Thrown at sources/engine/Stride.Foundation/Graphics/Image.cs:749

        /// Saves this instance to a stream.
        /// </summary>
        /// <param name="pixelBuffers">The buffers to save.</param>
        /// <param name="count">The number of buffers to save.</param>
        /// <param name="description">Global description of the buffer.</param>
        /// <param name="imageStream">The destination stream.</param>
        /// <param name="fileType">Specify the output format.</param>
        /// <remarks>This method support the following format: <c>dds, bmp, jpg, png, gif, tiff, wmp, tga</c>.</remarks>
        internal static void Save(PixelBuffer[] pixelBuffers, int count, ImageDescription description, Stream imageStream, ImageFileType fileType)
        {
            foreach (var loadSaveDelegate in loadSaveDelegates)
            {
                if (loadSaveDelegate.FileType == fileType)
                {
                    loadSaveDelegate.Save(pixelBuffers, count, description, imageStream);
                    return;
                }
            }
            throw new NotSupportedException("This file format is not yet implemented.");
        }

        static Image()
        {
            Register(ImageFileType.Stride, ImageHelper.LoadFromMemory, ImageHelper.SaveFromMemory);
            Register(ImageFileType.Dds, DDSHelper.LoadFromDDSMemory, DDSHelper.SaveToDDSStream);
            Register(ImageFileType.Gif, StandardImageHelper.LoadFromMemory, StandardImageHelper.SaveGifFromMemory);
            Register(ImageFileType.Tiff, StandardImageHelper.LoadFromMemory, StandardImageHelper.SaveTiffFromMemory);
            Register(ImageFileType.Bmp, StandardImageHelper.LoadFromMemory, StandardImageHelper.SaveBmpFromMemory);
            Register(ImageFileType.Jpg, StandardImageHelper.LoadFromMemory, StandardImageHelper.SaveJpgFromMemory);
            Register(ImageFileType.Png, StandardImageHelper.LoadFromMemory, StandardImageHelper.SavePngFromMemory);
        }

        internal unsafe void Initialize(ImageDescription description, IntPtr dataPointer, int offset, GCHandle? handle, bool bufferIsDisposable, PitchFlags pitchFlags = PitchFlags.None, int rowStride = 0)
        {
            if (!description.Format.IsValid || description.Format.IsVideoFormat)
                throw new InvalidOperationException("Unsupported DXGI Format");

View on GitHub (pinned to 96fad776d2)