Total members 11895 |It is currently Tue Dec 03, 2024 8:07 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





use Image I/O library of java
Code:
import java.io.*;
import java.awt.image.*;
import javax.imageio.ImageIO;

public class 
CopyImage {
    private static final 
float[] data = { 0.0f, -1.0f0.0f, -1.0f5.0f,
      -
1.0f0.0f, -1.0f0.0f };
    public static 
void main(String args[]) throws IOException {
    
File fileIn = new File("image4.jpg");
    
BufferedImage bufferedImage1 ImageIO.read(fileIn);
    
Kernel kernel = new Kernel(33data);
    
ConvolveOp convolveOp = new ConvolveOp(kernelConvolveOp.EDGE_NO_OP,
        
null);
    
int width bufferedImage1.getWidth();
    
int height bufferedImage1.getHeight();
    
BufferedImage bufferedImage2 = new BufferedImage(widthheight,
        
BufferedImage.TYPE_INT_ARGB);
    
convolveOp.filter(bufferedImage1bufferedImage2);
    
File fileOut = new File("logo.gif");
    
ImageIO.write(bufferedImage2"GIF"fileOut);
  }




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Image I/O library
 Library Sort     -  
 Math Function Library     -  
 PHP SOAP server returns array using NuSOAP Library     -  
 Java Library Database Management System Project     -  
 PHP SOAP server returns array using NuSOAP Library     -  
 simple Ajax library solving back button and bookmarks     -  
 Image-Viewer-Image Processing-Filters-Noise-enhancements     -  
 Move image in front of a background image     -  
 different between cfa image and gray level image     -  
 PNG image to the image you generated     -  



Topic Tags

Java Image
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com