Sunday, 18 August 2013

displaying partially interlaced images java

displaying partially interlaced images java

I'm attempting to display a partially interlaced image all the even
scanlines for instance how would i best go about this. this is what i have
to display my current image on a applet, i'm wondering how i could get an
effect as if it was half the scanlines loaded, so i could then create
another picture with the rest of the scanlines loaded?
import java.applet.Applet;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import java.net.URL;
import javax.imageio.*;
public class Images extends Applet {
/**
*
*/
private static final long serialVersionUID = 1L;
private BufferedImage img;
public void init() {
try {
URL url = new URL(getCodeBase(), "original_image.jpg");
img = ImageIO.read(url);
} catch (IOException e) {
}
}
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
g2.drawImage(img, 10, 10, null);
}
}

No comments:

Post a Comment