// DrJava saved history v2 // get a picture file name as a string String fileName = FileChooser.pickAFile();//End of Interaction// System.out.println(fileName);//End of Interaction// // create a picture object Picture picture = new Picture(fileName);//End of Interaction// System.out.println(picture);//End of Interaction// // get a one-dimensional array of pixel objects Pixel[] pixelArray = picture.getPixels();//End of Interaction// // Get the first pixel in the array of pixels Pixel pixel = pixelArray[0];//End of Interaction// System.out.println(pixel);//End of Interaction// // get the color object from the pixel import java.awt.Color;//End of Interaction// Color color = pixel.getColor();//End of Interaction// System.out.println(color);//End of Interaction// // get the red value from the color object int red = color.getRed();//End of Interaction// System.out.println(red);//End of Interaction// // get the green value from the color object int green = color.getGreen();//End of Interaction// System.out.println(green);//End of Interaction// // get the blue value from the color object int blue = color.getBlue();//End of Interaction// System.out.println(blue);//End of Interaction// // get a pixel at position 25629 in the array pixel = pixelArray[25629];//End of Interaction// System.out.println(pixel);//End of Interaction//