advertisement

Article:
  Bitmap Image Filters
Subject:   Final code problem
Date:   2002-08-09 22:25:38
From:   johnts
In the final filterImage: code, there's a slight problem. At the top there are the declarations:
int w = [srcImageRep pixelsWide];
int h = [srcImageRep pixelsHigh];


But below in the for() loops, it's using 'height' and 'width'.

Main Topics Oldest First

Showing messages 1 through 2 of 2.

  • Final code problem
    2002-08-10 21:52:55  johnts [Reply | View]

    The final projects also has some warnings that can be very easily fixed. (I remember the warnings were around in the last version too):

    IAWindowController.m needs:

    #import "MyDocument.h"

    and in IAWindowController.h this needs to be added:

    - (void)setImageToDraw:(NSImage *)image;
  • I see why I and Mike didn't see
    2002-08-10 10:25:16  psheldon [Reply | View]

    The original partially filled out for loops did have w and h. Later loops didn't in the for lines controlling inside of the loops, the loop bodies, which did have w and h.

    I only changed the inside of the loops not bothering to look at or paste the outside of the loop, so we only glanced at the for control lines for human, not computer, meaning.

    I hope the above analysis of the mistake is useful.

    Cool you caught that.