Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Swing-AWT convert jpeg to gif

Have Programming Question? Ask it here!
 
 
 


sudhadevi
convert jpeg to gif
1 Answer(s)      6 years and 4 months ago
Posted in : Swing AWT



Advertisement
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>
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
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
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
Documentation
Documentation       eDump  Screenshot utility that integrates with the Eclipse workbench. Print screenshots or save them to GIF, BMP, PNG, JPeG, or TIFF
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  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
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
Servlet Example To Display Mysql Blob Data
, video clips, JPEG/GIF pictures, and Microsoft word documents. A BLOB
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 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
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 excel into pdf
convert excel into pdf  How to convert excel into pdf files
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 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
Convert the code to GUI
Java Code to GUI   can any one convert My code to GUI code
How to convert NSString to NSInteger?
How to convert NSString to NSInteger?  Hi, Provide me code to convert NSString into NSInteger. Thanks   Hi, Use the following code example: NSString * s= @"100"; NSInteger i = [s intValue]; Thanks
convert system.out.print( p[ j ] +
convert system.out.print( p[ j ] +   how to display this on midlet? for( int j = 0; j < p.length; j++ ){ System.out.print( p[ j
how to convert ACSII to HEX
how to convert ACSII to HEX  How to convert perticular ASCII... value of ~:00   The given code accepts the string and convert...() to convert it to Hex value. class ConvertAsciiToHex { public static void
How to Convert String to Date?
How to Convert String to Date?  Hi, I am new in Java and learning... have to convert it to Date object. Tell me How to Convert String to Date? Thanks   Hi Dude, Its very easy to convert the String into date format
How to convert a String to an int?
How to convert a String to an int?  I my program I am taking... format. Now I want to convert into int value. Tell me How to convert a String... contains the value 1025, then you can use the following code to convert the String
how to convert jsp to exe
how to convert jsp to exe  hello sir, i am doing webapplication. the configuration is windows xp operating system,IE6.0,apache... to another system. so i want to convert this to exe. that will executed only internet
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 for data input to the back propagation neural network. Example in notepad
convert jsp to servlet
convert jsp to servlet  how to convert following code into servlet int i=0; while(rs.next()) { %> <tr> <td> <input type="checkbox" name="check<%=i%>" value=<%= rs.getString("bookid
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> <
Java program - convert words into numbers?
Java program - convert words into numbers?   convert words into numbers?   had no answer sir
convert numbers to strings using JavaScript
convert numbers to strings using JavaScript  How to convert numbers to strings using JavaScript
convert current date into date format
convert current date into date format  How to get current date and convert into date format in Java or PHP
How to convert XML file to database ?
How to convert XML file to database ?  How to convert XML file to database
How to convert string to byte in Java
How to convert string to byte in Java  How to convert string to byte in Java
how to convert string to image in java
how to convert string to image in java  how to convert string to image in java? I know we need to convert image to a byte array at some point in my application but do not know how to convert a image into byte string. Please
java program to convert decimal in words
java program to convert decimal in words  write a java program to convert a decimal no. in words.Ex: give input as 12 output must be twelve
convert zip file to byte array
convert zip file to byte array  Hi,How to convert zip file to byte array,can you please provide program?? Thanks, Ramanuja
Advertisements
 

 

 

DMCA.com