public IndexedFlowGraphicsCodec(FlowGraphicsFormat format) { Format = format; Name = format.Name; AllocateBuffers(); // Consider implementing resize increment with more accurate LCM approach // https://stackoverflow.com/questions/147515/least-common-multiple-for-3-or-more-numbers WidthResizeIncrement = format.ImageProperties.Max(x => x.RowPixelPattern.Count); }
public IGraphicsFormat Clone() { var clone = new FlowGraphicsFormat(Name, ColorType, ColorDepth, Layout, DefaultWidth, DefaultHeight) { FixedSize = FixedSize, MergePlanePriority = MergePlanePriority.ToArray(), ImageProperties = new List <ImageProperty>() }; foreach (var prop in ImageProperties) { var propclone = new ImageProperty(prop.ColorDepth, prop.RowInterlace, prop.RowPixelPattern); clone.ImageProperties.Add(propclone); } return(clone); }