vendredi 25 janvier 2008

Errors in Apple "Image Unit Tutorial"

While following the Image Unit Tutorial (the 2007-10-31) version, i found a few errors that prevented the correct building of the sample Image Units.

In summary, the errors affect the Detective Lens Image Unit and the Pixellate Filter.

For the Detective Lens Filter ImageUnit example, the following changes are required in the Detective Lens Objective-C section:
  1. To be in line with DetectiveLensFilter.h of step 5, DetectiveLensFilter.m shall be corrected by changing inputWidth in customAttributes (step 10) into inputLensDiameter
  2. Accordingly, method outputImage shall be modified (step 13) so that all occurences of inputWidth are changed into inputLensDiameter
  3. Also in step 13, in outputImage, CIFilter *f; shall read CIFilter *compositedImage;
  4. In DetectiveLensFilter.m, the init method shall be modified so that path and url variables are declared as follows:
NSString *path = nil;
NSURL *url = nil;

For the Pixellate filter:
  1. In Pixellate.m, in method outputImage (step 8), PixellateTwoFilterKernel shall be changed to PixellateFilterKernel
Put online in the hope that it may help somebody.

Aucun commentaire: