public BuildNode Decode(IBytesSource source, int ioId, DecodeCommands commands)
 {
     AddInput(ioId, source);
     if (commands == null)
     {
         return(BuildNode.StartNode(this,
                                    new
         {
             decode = new
             {
                 io_id = ioId
             }
         }));
     }
     return(BuildNode.StartNode(this,
                                new
     {
         decode = new
         {
             io_id = ioId,
             commands = commands.ToImageflowDynamic()
         }
     }));
 }
示例#2
0
 /// <summary>
 /// Decode an image into a frame
 /// </summary>
 /// <param name="source">Use BytesSource or StreamSource</param>
 /// <param name="commands">Commands to the decoder, such as JPEG or WebP block-wise downscaling for performance, or to discard the color profile</param>
 /// <returns></returns>
 public BuildNode Decode(IBytesSource source, DecodeCommands commands) =>
 Decode(source, GenerateIoId(), commands);