Image Editing and Transformation System
Image Editing and Transformation System
Image editing encompasses the processes of altering images by manipulating, enhancing, and
transforming images. In this project, given the image in RGB format as a pixel map structure or
a as a standard file format (like *.bmp), you have to perform following operations:
(a) image size alteration
(b) selective color change
(c) blurring of images
(d) contrast change
(e) brightening
(f) slicing and cropping of image.
1. alterSize(int size) : used for altering the image size. The function gets the int variable
size as input which contains the percentage of the size to be altered in the image.
3. blurImage(int radius) : used to blur the image for the specified radius in the image. For
example if the radius 1, then imgData[3][3] in the output image would be average of
following 9 points in the source image ( imgData[2][2], imgData [2][3], data [2][4] , data
[3][2], data [3][3], data [3][4], data[4][2], data [4][3], data [4][4] ). Similarly, for radius 2,
you would taking average of up to 25 points for each pixel
6. cropImage(int crop) : used to crop the image. The function accepts int crop which
contains the percentage of image cropping needs to be done.
Constraints
All the data of the each pixel present in the image is maintained using the two dimension
integer array int [ ] [ ] imgData
Input image is in RGB Format (integer value up to 0xFFFFFF). If any pixel is more than
this, do nothing on the image.
0 <= size <= 100, else do nothing on the image.
The radius used in the blurImage function has to be less than both rows and columns in
the source image, otherwise do nothing on the image.
0 <= brightIntensity <= 100, else do nothing on the image.
Whenever the getCurrentImage() function is called, it has to return the current image
value using the two dimensional integer array.
Example 1
Input
Output
To get the current image, the method getCurrentImage() is called which will return an two dimensional int
array that contains{{0xFFFFFF, 0x00FF00, 0x0000FF}, {0xFF00FF, 0xFFFF00, 0x00FFFF}, {0xFFFFFF,
0xFFFFFF, 0x000000} } .
Explanation:
In the output, the first element of the current image value has be changed from 0xFF0000 to
0xFFFFFF
Example 2
Input
Output
To get the current image, the method getCurrentImage() is called which will return an two dimensional int
array that contains
imgData = { { 0x620058, 0x640055, 0x6a0050, 0x710048, 0x740044 },
{ 0x620058, 0x640055, 0x6a0050, 0x710048, 0x740044 },
{ 0x620058, 0x640055, 0x6a0050, 0x710048, 0x740044 } };
The package names, class names, method signatures to be used are mentioned in the problem
statement. Do not use your own names or change the method signatures and fields. You can add any
number of additional methods.