Code Template You can download a template of the kroutine by clicking here. This template includes all Khoros system calls, helpful macros to access pixels, variables to hold the dimensions of the value segment, and pointers to the input and output data. Places where you can define additional variables, add your own code and define additional procedures are indicated by comments. Hints Interesting input images can be found using a web search engine. Use xv to convert an input image from the web to greyscale and save it in .pgm format.
Modular design is good.
If it doesn't work for this case it won't work in more interesting cases. Make sure that you understand the expressions for bilinear interpolation and are using them properly. For regions other than the upper left region of the target image, they will have to be modified. Read the previous hint again. Check boundary cases.