 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Peter Guest
|
Posted: Fri Jan 30, 2004 6:08 pm Post subject: Logical and Arithmetic operations with images |
|
|
Hello,
Somebody knows where can I find a java applet code that implements
arithmetic and logical operations with images.
I need a realy easy code because I never have programed in visual Java.
I allready searched in the Internet but I haven't found anything.
Thanks in advance
Peter
|
|
| Back to top |
|
 |
S Manohar Guest
|
Posted: Sun Feb 01, 2004 1:46 am Post subject: Re: Logical and Arithmetic operations with images |
|
|
"Peter" <peter (AT) gondomaronline (DOT) com> wrote
| Quote: | Hello,
Somebody knows where can I find a java applet code that implements
arithmetic and logical operations with images.
I need a realy easy code because I never have programed in visual Java.
I allready searched in the Internet but I haven't found anything.
Thanks in advance
Peter
|
Sorry, haven't got any examples, but it is fairly simple using java.awt.image.*
try this
//create a blank image
BufferedImage bi = new BufferedImage(100,100,BufferedImage.TYPE_INT_RGB), bi2;
//draw something to it (your source image)
bi.getGraphics().drawImage(*** draw your original image here***);
//create an operation of your choice
BufferedImageOp op = new *** insert your BufferedImageOp implementor here
(e.g. AffineTransformOp, ColorConvertOp, ConvolveOp, LookupOp, RescaleOp) ***
//create a destination image
bi2=op.createCompatibleDestImage(bi, bi.getColorModel());
//do the filtering
op.filter(bi,bi2);
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|