Share on Google+Share on Google+

sudhadevi
convert jpeg to gif
1 Answer(s)      8 years ago
Posted in : Swing AWT

Ads

View Answers

May 16, 2008 at 4:11 PM


Hi friend,

import java.io.*;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;

public class JPGtogif{
public static void main(String a[]){
try{
System.out.println("Enter image name\n");
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
String imageName=bf.readLine();
File input = new File(imageName);
BufferedImage image = ImageIO.read(input);
System.out.println("Enter the output image name(.gif):\n");
String imageName1=bf.readLine();
File output = new File(imageName1);
ImageIO.write(image, "gif", output);
System.out.println("Your image has been converted successfully");
}catch(FileNotFoundException e){
System.out.println("Error:"+e.getMessage());
}catch(IOException e)
{
System.out.println("Error:"+e.getMessage());
}
catch(Exception e){
System.out.println(e.getMessage());
}

}
}

--------------------------------------------
Read for more information,

http://www.roseindia.net/java/









Related Tutorials/Questions & Answers:
convert jpeg to gif - Swing AWT
convert jpeg to gif  i want to convert jpeg file to gif file. in the roseindia's already existing program,i can convert gif to jpeg.But i cant convert jpeg to gif. help me plz....  Hi friend, import java.io.
How to save JPanel as gif or jpeg file
How to save JPanel as gif or jpeg file  i draw polygons , rectangles, lines on jpanel using draw line method drawpolygon methods etc, now i want save the data of jpanel which is drawn by me(lines,polygons) as a gif or jpeg file
Advertisements
How to save JPanel as gif or jpeg file
How to save JPanel as gif or jpeg file  i draw polygons , rectangles, lines on jpanel using draw line method drawpolygon methods etc, now i want save the data of jpanel which is drawn by me(lines,polygons) as a gif or jpeg file
how to re size image proportionately using java for different images like jpeg, png, gif.
how to re size image proportionately using java for different images like jpeg, png, gif.  hi, i need sample code for re size image proportionately using java for different images like jpeg, png, gif, this code for my
convert tiff image to gif image - WebSevices
convert tiff image to gif image  please tell me "how to convert tiff image to gif image?" using php code for the purpose of "i want to upload....".gif"; echo "Image Extension changed: ". $imgname . "<br>
J2ME jpeg image
J2ME jpeg image  Within the property window of a JPEG image, there is a tab called 'Summary'. Within this tab, there is a field called 'Comments' I would like to write some j2me code which will add a given string to this field
Export chart to JPEG file
Export chart to JPEG file  Hi. I have one problem. I have generated piecharts and barcharts using chartlib.js and jquery in jsp. Now i want to export this charts to jpeg file . how can i do this? Thank q in advance
com.pixelmed.dicom.DicomException: No reader for jpeg-lossless available
com.pixelmed.dicom.DicomException: No reader for jpeg-lossless available   com.pixelmed.dicom.DicomException: No reader for jpeg-lossless available
PHP GD gif
: image/gif'); $img = LoadGif('Roseindia'); imagegif($img); imagedestroy($img
How to copy text from a gif image
How to copy text from a gif image  I have some gif images that containing some important text. i want to have that text in my notepad file. i have some hundred's of gif images like that. so that i can't type the text in notepad
Read content for JPEG image File in Java - Java Beginners
Read content for JPEG image File in Java  How to Read content for JPEG image File in Java? or Extract text from JPEG image File in Java
Documentation
Documentation       eDump  Screenshot utility that integrates with the Eclipse workbench. Print screenshots or save them to GIF, BMP, PNG, JPeG, or TIFF
How to read content of JPEG file in Java?
Example of reading the content of JPEG file in Java Java JAI API helps the programmers to write program for handling the different types of image in the Java Program. In this article we will see how to read the JPEG image file. We
How to copy an jpeg image from one folder to other folder using jsp
How to copy an jpeg image from one folder to other folder using jsp  How to copy an image from one folder to another folder using jsp
convert to decimal
convert to decimal  f42a4 convert to decimal by using java
How to copy an jpeg image from one folder to other folder using jsp
How to copy an jpeg image from one folder to other folder using jsp  hello, i am creating photo gallery where from admin side i allow admin to browse... be in my image folder...so,How to copy an jpeg image from one folder to other
Servlet Example To Delete Mysql Blob Data
clips, JPEG/GIF pictures, and Microsoft word documents. getBlob() and setBlob
Servlet Example To Display Mysql Blob Data
, video clips, JPEG/GIF pictures, and Microsoft word documents. A BLOB
Convert - Applet
Convert   Hello dear colleques I would like to ask about some converting program currently i am doing converting program my graduation report. I came from mongolia and I live in korea now. therefore my supevisor gave
convert into hql
convert into hql   String sqlListSurveys= "select distinct s.surveyAutoID, s.surveyTitle, date(s.modifiedOn) modifiedOn, s.createdOn, " + "( CASE s.surveyState WHEN '0' THEN 'Created' WHEN '1' THEN 'Published
Image Control in Flex4
component. Flex Supports different types of file format like JPEG, GIF, SVG... control. Flex importing GIF, JPEG, PNG, and SWF files at run time, and embedding GIF, JPEG, PNG, SVG, and SWF at compile time. There are two forms of source
convert to GUI
convert to GUI  import java.util.Scanner; public class Exam { public static void main (String args[]) { int numberStudent, mark, markAplus = 0, markA = 0, markBplus = 0, markB = 0, markBminus = 0, i; int markCplus = 0, markC
Convert the code to GUI
Convert the code   How to convert a code to GUI look alike
convert date time to int
convert date time to int  convert date time to int
convert excel into pdf
convert excel into pdf  How to convert excel into pdf files
Convert the code to GUI
Is it possible to convert a code into GUI  Is it possible to convert a code into GUI
Convert the code to GUI
How to Convert the code to GUI   How to convert a code into GUI
convert data format sql
convert data format sql  convert data format sql
convert voice to digital
convert voice to digital  convert voice to digital How to convert human voice to the digital signal(binary) that can stored in notepad. Then, this notepad can be used
convert string to date nsdate
convert string to date nsdate  Hi, How to convert c string to date NSDate?   Convert NSDate to NSString
convert rupees to doller
convert rupees to doller  give me the core code that how to convert rupees to doller and doller to rupees . user put the rupees and it convert in doller
Tutorials   
Java Spring Hibernate Struts Training Change JPanel background color from mouse entered/exit event JTable Pagination Jcombobox JAVA SWING how can i display a pdf file in a jtextarea Crop Image Code in Applet Crop Image Code in Applet Image Manipulation in Swing AWT Applet Ho to get virtual key code. how to show set of images continously using JScrollpane in java how to show set of images continously using JScrollpane in java How to connect on screen keyboard to system. How to connect on screen keyboard to system. query java client server program for playing video file(stored in folder in the same workspace) using swings java client server program for playing video file(stored in folder in the same workspace) using swings java client server program for playing video file(stored in folder in the same workspace) using swings java client server program for playing video file(stored in folder in the same workspace) using swings Download. how to open one Jframe from main method call Urgent requirement display shapes i am getting an error in adding a menu item to a menu. I am trying to develop a Image Sliding application but unfortunately its not working... Can any one help me in this Sliding window protocol how to update the value of jslider how to update the value of jslider how to update the value of jslider how to update the value of jslider how to update the value of jslider Jbutton in JTable cells program code java textfield problem swing retrieve data from database in java swing form using prev n next buttons retrieve data from database in java swing form using prev n next buttons How to close a frame on action event of a button from a different class ? searching the data swings for webnms Jpanel allignment pass data from java frame to file code for traffic control system simulation Bank Management System how to maKE Jcombox editable after saveing value init. i havei) aJTextField and one button. when place the cursor or enter anything in the test field then only button should be enabled.by default the button should be disabled. i havei) a jtable with few cloumns and few rows andii) one button. when place the cursor in any of the table's column cell. i need to enable the button.by default the button should be disabled. PDF Comparator i have JTextfield and JComboBox. there are several values in combobox.when i select a value from combobox how to make textfiled as a combobox. issue on jcombobox

Ads

 
Advertisement null

Ads