advertisement

Article:
  Bitmap Image Filters
Subject:   confused by NSImage
Date:   2009-03-16 03:37:52
From:   Robin Forder
Response to: confused by NSImage

I can reproduce the problem, indeed. The explanation is, I believe, that the filter is set up to convert RGB to grayscale. If you try to convert grayscale to grayscale, each of the destination pixels will be an average of the corresponding source pixel, the pixel to the right of that one, and the pixel to the right of that. It would result in an average leftwards shift by one pixel. This explains the stepping to the left, probably the breaking up of your vertical band, and also the accompanying blurring.
The first operation, rgb file to grayscale image, results in no leftwards move, which suggests that the effect is actually to do with the image formats.