Browse Source

LibGfx: Add a FIXME to ICC encode_tag_data()

Nico Weber 2 years ago
parent
commit
07bf2d944c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp

+ 4 - 0
Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp

@@ -293,6 +293,10 @@ static ErrorOr<ByteBuffer> encode_tag_data(TagData const& tag_data)
     case XYZTagData::Type:
         return encode_xyz(static_cast<XYZTagData const&>(tag_data));
     }
+
+    // FIXME: If this gets hit, we always write an invalid icc output file.
+    // Make this return an Optional and don't write tags that have types we can't encode.
+    // Not ideal, but better than writing invalid outputs.
     return ByteBuffer {};
 }