public class ChromakeyApp extends Picture
{
public static void main(String[]a)
{
FileChooser.pickMediaPath();
Picture pOrigRef = new Picture( FileChooser.pickAFile() );
KeyablePicture pKPRef = new KeyablePicture(pOrigRef);
pKPRef.explore();
Picture bg = new Picture(FileChooser.pickAFile());
Picture r = new Picture(FileChooser.pickAFile());
pKPRef.chromakey2(bg,r);
pKPRef.explore();
Picture bgg = new Picture(FileChooser.pickAFile());
Picture rr = new Picture(FileChooser.pickAFile());
pKPRef.chromakey2(bgg,rr);
pKPRef.explore();
}
}
The first explore call shows an original picture that i choose. the chromakey2 method tells java to replace pixels of a certain color, and so i choose 2 more picture files to replace 2 different colors of pixels(basically the background) and that works fine. the last 4 lines though, instead of bringing up a picture with a different background that i select, it brings up the same picture as chromakey2(bg, r). how do i get it to show the different background that i chose?
this may be unclear, im not very good at this lol.