ディザリング処理でJarvis法を使用した場合、行データの先頭付近が黒ドットになる

文書番号 : 39640     文書種別 : 不具合     登録日 : 2016/10/21     最終更新日 : 2016/10/21
文書を印刷する
対象製品
LEADTOOLS 17.5J Imaging Pro
状況
現象確認済み
詳細
バッファ方式による画像のディザリング処理でRasterDitheringMethod.Jarvisを指定した場合、RasterImage.DitherLine()で出力される行データの先頭データ付近が黒ドットになる場合があります。

[C#]
RasterImage image;
RasterCodecs codecs = new RasterCodecs();

image = codecs.Load(@"..¥..¥..¥Images¥test.jpg");

// パレット画像を新規作成します。
RasterImage destinationImage = new RasterImage(RasterMemoryFlags.Conventional, image.Width, image.Height, 1, image.Order, image.ViewPerspective, null, IntPtr.Zero, 0);
destinationImage.XResolution = image.XResolution;
destinationImage.YResolution = image.YResolution;

// ディザリング方法を設定します。
RasterDitheringMethod method = RasterDitheringMethod.Jarvis;
image.DitheringMethod = method;

// ディザリング処理を初期化します。
image.StartDithering(null, 2);

// 出力バッファを割り当てます。
byte[] InBuffer = new byte[image.BytesPerLine];// 入力行を格納するバッファ
byte[] OutBuffer = new byte[destinationImage.BytesPerLine];// 出力行を格納するバッファ

// DitherLineメソッドを使用して、画像の各ラインを処理します。
for (int i = 0; i < image.Height; i++)
{
  image.GetRow(i, InBuffer, 0, image.BytesPerLine);
  image.DitherLine(InBuffer, 0, OutBuffer, 0);
  destinationImage.SetRow(i, OutBuffer, 0, destinationImage.BytesPerLine);
}
// ディザリング処理を終了します。
image.StopDithering();

codecs.Save(destinationImage, @"..¥..¥..¥Images¥result.jpg", RasterImageFormat.Jpeg, 24);
回避方法
現在のところ回避方法はございません。
FloydStein、Stucki等のディザリング方法をご検討ください。