Photo Vignette Removal Tool (Jython, Python)

I need to build code for this question.
First we need to understand what the vignette looks like in isolation, without the clutter of 
a beautiful scene. For this, a picture of a flat surface of a single colour that is evenly lit (such 
as a white wall or plain blue sky during mid-day) is obtained and used as a “vignette 
profile”. You are given the following vignette profile image.

In this image, the pixels towards the center of the image have higher RGB values (i.e. 
brighter pixels) than the pixels that are away from the center. The image is also black and 
white, so red, green and blue values of any given pixel are the same. You must not modify 
this image. 

2. We need to use the vignette profile image from step #1 as a filter for our normal photos 
captured by our camera so that the vignette can be removed. For this you need to divide 
the photo image (with vignette) by the vignette profile image. As the pixels in the vignette 
image have RGB values that are smaller (darker) towards its edges, dividing the original 
image's corresponding pixels by a small number will make them brighter

These are the hints 
Hint 1: This requires you to perform your operations on your images, pixel by pixel. I.e. you 
cannot do it in a single step. 
Hint 2: The first challenge for you will be keeping the RGB values resulting from the division 
within the 0-255 range for each channel, as valid RGB values are between 0 (darkest) and 
255 (brightest).


Photo Vignette Removal Tool (Jython, Python)
===


I need to build code for this question.
First we need to understand what the vignette looks like in isolation, without the clutter of 
a beautiful scene. For this, a picture of a flat surface of a single colour that is evenly lit (such 
as a white wall or plain blue sky during mid-day) is obtained and used as a “vignette 
profile”. You are given the following vignette profile image.

In this image, the pixels towards the center of the image have higher RGB values (i.e. 
brighter pixels) than the pixels that are away from the center. The image is also black and 
white, so red, green and blue values of any given pixel are the same. You must not modify 
this image. 

2. We need to use the vignette profile image from step #1 as a filter for our normal photos 
captured by our camera so that the vignette can be removed. For this you need to divide 
the photo image (with vignette) by the vignette profile image. As the pixels in the vignette 
image have RGB values that are smaller (darker) towards its edges, dividing the original 
image's corresponding pixels by a small number will make them brighter

These are the hints 
Hint 1: This requires you to perform your operations on your images, pixel by pixel. I.e. you 
cannot do it in a single step. 
Hint 2: The first challenge for you will be keeping the RGB values resulting from the division 
within the 0-255 range for each channel, as valid RGB values are between 0 (darkest) and 
255 (brightest).

