I am here with a problem in a program having a mirror image in java, that the mirror is half of the picture!
Code:
public class (pixels
public static void main (String [] args) (
Picture img = new Picture ( "E: \ \ fac \ \ ITI \ \ work 2 ITI \ \ coracao_azul.jpg");
int colNum img.getWidth = ();
int linNum = img.getHeight ();
int a = colNum;
int b = linNum;
for (int c = 0; c <colNum c + +) (
for (int l = 0; l <linNum; k + +) (
Pixel thisP = img.getPixel (c, l);
img.getPixel (c-1, bl-1). setRed (img.getPixel (c, l). getRed ());
img.getPixel (c-1, bl-1). setGreen (img.getPixel (c, l). getGreen ());
img.getPixel (c-1, bl-1). setBlue (img.getPixel (c, l). getBlue ());
)
)
img.explore ();
)
)
I can not figure out where the problem is. Someone let the sight it.
Bookmarks