コード例 #1
0
ファイル: SpeedControl.cs プロジェクト: itdimk/AMAGE
        public void Apply(IImageList input, IImageList output)
        {
            int[] delayValues = tuner.GetSnapshots <int>(nameof(TargetDelay))
                                .Interpolate(CustomFrames.Count);

            for (int i = 0; i < CustomFrames.Count; ++i)
            {
                int frame = CustomFrames[i];

                output[frame].AnimationDelay = delayValues[i];
            }
        }
コード例 #2
0
        public unsafe void Apply(IImageList input, IImageList output)
        {
            Int32Rect area = CustomArea;

            int[] hueValues = tuner.GetSnapshots <int>(nameof(Hue))
                              .Interpolate(CustomFrames.Count);

            float[] lightnessValues = tuner.GetSnapshots <float>(nameof(Lightness))
                                      .Interpolate(CustomFrames.Count);

            float[] saturationValues = tuner.GetSnapshots <float>(nameof(Saturation))
                                       .Interpolate(CustomFrames.Count);

            Apply(input, output, (inputs, outputs, widths, heights) =>
            {
                for (int i = 0; i < CustomFrames.Count; ++i)
                {
                    int frame = CustomFrames[i];

                    Apply(inputs[frame], outputs[frame], widths[frame], heights[frame], area,
                          hueValues[i], saturationValues[i], lightnessValues[i]);
                }
            });
        }
コード例 #3
0
ファイル: ColorFiltering.cs プロジェクト: itdimk/AMAGE
        public unsafe void Apply(IImageList input, IImageList output)
        {
            Int32Rect area = CustomArea;

            Color[] colorValues = tuner.GetSnapshots <Color>(nameof(TargetColor))
                                  .Interpolate(CustomFrames.Count);

            Apply(input, output, (inputs, outputs, widths, heights) =>
            {
                for (int i = 0; i < CustomFrames.Count; ++i)
                {
                    int frame = CustomFrames[i];

                    Apply(inputs[frame], outputs[frame], widths[frame], heights[frame], area,
                          colorValues[i]);
                }
            });
        }