convert jpeg to gif

convert jpeg to gif

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>
ModuleNotFoundError: No module named 'jpeg'
ModuleNotFoundError: No module named 'jpeg'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'jpeg' How to remove the ModuleNotFoundError: No module named 'jpeg' error
ModuleNotFoundError: No module named 'gif'
ModuleNotFoundError: No module named 'gif'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'gif' How to remove the ModuleNotFoundError: No module named 'gif' error
ModuleNotFoundError: No module named 'gif'
ModuleNotFoundError: No module named 'gif'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'gif' How to remove the ModuleNotFoundError: No module named 'gif' error
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
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
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
ModuleNotFoundError: No module named 'gif-for-cli'
ModuleNotFoundError: No module named 'gif-for-cli'  Hi, My Python... 'gif-for-cli' How to remove the ModuleNotFoundError: No module named 'gif-for-cli' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'gif-for-cli'
ModuleNotFoundError: No module named 'gif-for-cli'  Hi, My Python... 'gif-for-cli' How to remove the ModuleNotFoundError: No module named 'gif-for-cli' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'gif-for-cli'
ModuleNotFoundError: No module named 'gif-for-cli'  Hi, My Python... 'gif-for-cli' How to remove the ModuleNotFoundError: No module named 'gif-for-cli' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'gif-frames'
ModuleNotFoundError: No module named 'gif-frames'  Hi, My Python... 'gif-frames' How to remove the ModuleNotFoundError: No module named 'gif... have to install padas library. You can install gif-frames python
ModuleNotFoundError: No module named 'gif-frames'
ModuleNotFoundError: No module named 'gif-frames'  Hi, My Python... 'gif-frames' How to remove the ModuleNotFoundError: No module named 'gif... have to install padas library. You can install gif-frames python
ModuleNotFoundError: No module named 'gif-for-cli'
ModuleNotFoundError: No module named 'gif-for-cli'  Hi, My Python... 'gif-for-cli' How to remove the ModuleNotFoundError: No module named 'gif-for-cli' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'gif-frames'
ModuleNotFoundError: No module named 'gif-frames'  Hi, My Python... 'gif-frames' How to remove the ModuleNotFoundError: No module named 'gif... have to install padas library. You can install gif-frames python
ModuleNotFoundError: No module named 'epub-extract-jpeg'
ModuleNotFoundError: No module named 'epub-extract-jpeg'  Hi, My... named 'epub-extract-jpeg' How to remove the ModuleNotFoundError: No module named 'epub-extract-jpeg' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'epub-extract-jpeg'
ModuleNotFoundError: No module named 'epub-extract-jpeg'  Hi, My... named 'epub-extract-jpeg' How to remove the ModuleNotFoundError: No module named 'epub-extract-jpeg' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'epub-extract-jpeg'
ModuleNotFoundError: No module named 'epub-extract-jpeg'  Hi, My... named 'epub-extract-jpeg' How to remove the ModuleNotFoundError: No module named 'epub-extract-jpeg' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'dash-gif-component'
ModuleNotFoundError: No module named 'dash-gif-component'  Hi, My... named 'dash-gif-component' How to remove the ModuleNotFoundError: No module named 'dash-gif-component' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'gif-me-loader'
ModuleNotFoundError: No module named 'gif-me-loader'  Hi, My... 'gif-me-loader' How to remove the ModuleNotFoundError: No module named 'gif-me-loader' error? Thanks   Hi, In your python
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
PHP GD gif
, $tc); }ADS_TO_REPLACE_4 return $im; } header('Content-Type: image/gif');ADS
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
convert to decimal
convert to decimal  f42a4 convert to decimal by using java
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
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
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
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 this html form to jsp
convert this html form to jsp  <html> <head> <script language="javascript" src="images/validationm.js"></script> <...].gif" width="200" height="100"></p> </td> </tr> <
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 data format sql
convert data format sql  convert data format sql
convert date time to int
convert date time to int  convert date time to int
Convert the code to GUI
Convert the code   How to convert a code to GUI look alike
Convert the code to GUI
How to Convert the code to GUI   How to convert a code into GUI
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 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
convert string to date nsdate
convert string to date nsdate  Hi, How to convert c string to date NSDate?   Convert NSDate to NSString
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
How to convert into to String in Java?
How to convert into to String in Java?  Hi, How to convert into to String in Java? Thanks
convert mp4 to mov ffmpeg
convert mp4 to mov ffmpeg  How to convert mp4 to mov using ffmpeg? Thanks
ModuleNotFoundError: No module named 'convert'
ModuleNotFoundError: No module named 'convert'  Hi, My Python... 'convert' How to remove the ModuleNotFoundError: No module named 'convert... to install padas library. You can install convert python with following command

Ads