How to save applet in image(gif/jpeg) format

Hi there !
how to save applet in image (gif/jpeg) format. i have just gone through JIMI package where serilization is there ,WHERE U CAN SORE in image format ...........can anybudy help me out.........if possible then pleeez provide me some example.
Thanks in advan...........

I think that is possible because i have seen some commercial applets that do that.
-http://www.izhuk.com/painter/
-http://www.lawrencegoetz.com/programs/signature/
Thses two saves the image in the server since applets cant write in the host they are running. Maybe it would be possible whit JFS, i don't know.
For now I am trying to store an image draw in the applet on my server.
My idea now is copying the image to a buffer or something, open a connection to the server and receive the image with a perl CGI.
There is an example with text:
-http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html
I want to do something similar but with an image.

Similar Messages

  • How do I save modified RAW images in JPEG format?

    Hi,
    I have several RAW images that I mass modified with the "Camera Raw" editor (I modified one and applied the changes to all other images). How can I now save the modified images as JPEG images? I know I could open each file in Photoshop and save it as JPEG there, but that would take A LONG time.
    Thanks for any pointers!
         Mark

    They have to be opened, one by one, before the adjustments are applied and the image files saved, but the process can be automated.  For instance through the already included Image Processor, or Image Processor Pro, also pre-installed, or through Actions and Droplets you create yourself.

  • How to save Camera Raw image as JPEG

    I have opened a jpeg as Camera Raw (7.3) and adjusted it and wanted to save it as jpeg, but the only option is *.dng? Any ideas?
    Thanks

    You have to open it into the Elements Editor and save from there.  The Adobe Camera Raw plug-in for regular Photoshop, not Elements, will allow saving from within the plug-in but not the Elements version of ACR.

  • Do you know how to save a VB Form as JPEG image?

    I have a form displaying graph and knob (dial meter) output that is output only. I want to save the form "image" as a JPEG file (or other picture format) so I can display it in a web page for info purposes only. I plan to "refresh/rewrite" the JPEG every minute of so. I have seen software that does this. It is nice for presenting info in the browser (to non wintel machines for example).
    Any idea how to do it?
    Thanks

    Also, if you're using VB.NET, this is pretty easy ... something like this would work:
    Private Shared Function BitBlt( _
    ByVal hdcDest As IntPtr, _
    ByVal nXDest As Integer, _
    ByVal nYDest As Integer, _
    ByVal nWidth As Integer, _
    ByVal nHeight As Integer, _
    ByVal hdcSrc As IntPtr, _
    ByVal nXSrc As Integer, _
    ByVal nYSrc As Integer, _
    ByVal dwRop As Integer _
    ) As Boolean
    End Function
    Private Shared SRCCOPY As Integer = &HCC0020
    Private Sub SaveFormToFile(ByVal sourceForm As Form, ByVal filename As String)
    Dim formGraphics As Graphics = sourceForm.CreateGraphics()
    Dim
    bufferRect = sourceForm.ClientRectangle
    Dim buffer As Image = New Bitmap(bufferRect.Width, bufferRect.Height, formGraphics)
    Dim bufferGraphics As Graphics = Graphics.FromImage(buffer)
    Dim formDC As IntPtr = formGraphics.GetHdc()
    Dim bufferDC As IntPtr = bufferGraphics.GetHdc()
    BitBlt(bufferDC, 0, 0, bufferRect.Width, bufferRect.Height, formDC, 0, 0, SRCCOPY)
    bufferGraphics.ReleaseHdc(bufferDC)
    formGraphics.ReleaseHdc(formDC)
    bufferGraphics.Dispose()
    formGraphics.Dispose()
    buffer.Save(filename, System.Drawing.Imaging.ImageFormat.Jpeg)
    buffer.Dispose()
    End Sub
    If you copied and pasted this to your form, you could then save the form to a .jpg file anytime you want by passing the Me reference in for this first parameter and the filename that you want to save it to. For example, if you wanted to create a .jpg file in the root directory of your C drive called "Test.jpg":
    SaveFormToFile(Me, "Test.jpg")
    - Elton

  • Anyone know how to Save an Java Image to gif or png file?

    I'm trying to build a Map Edito for game, I want to import some images which and a lot of tiles in each of them. I want to cut each tile 24x24 out, then save it in an invidual file.
    Anyone know how to save to file? any easy way?
    I know there is somehthing call JPEGEncoding to save into jpeg...
    thanks!

    Java Advanced Imaging does it nicely, take a look.
    I do not remember the extact syntax right now, but have used it in the past.

  • How to save contents in paintbox to .jpeg or any image file using Director?

    I'm having difficulty in our System using Director (THESIS) because one of the compilation we had is to save the drawings in the paintbox into an image file (.jpeg, .bmp, .png, etc). Is there someone who can help me? Please I really need to learn it before deploying the final System. Thanks much~

    You could try Valentin's image encoders:
    http://valentin.dasdeck.com/lingo/image_encoders/

  • How to save transparent background images to have transparent background thumbnails with Photoshop 2014?

    In old versions of Photoshop there was a feature that made thumbnail images have a transparent background.  I'm a CC member using Photoshop 2014 on a MacBook Pro running OS X 10.9.4 and every thumbnail of a transparent background image I've created in Photoshop 2014 appears on my desktop with a solid white box background that has a thin black outlined box inside of it.  How do I save the transparent background images I've created in Photoshop 2014 so they will appear on my desktop as thumbnails with a transparent background?   I'd like to continue to be able to replace the default background-less folder icon that that appears on files with transparent background thumbnails to customize my files as I use to do with older versions of Photoshop.

    If your layered document has a Photoshop background layer it visibility need to be set off when saving a PNG or Gif file for Photoshop background layers do not support transparency.
    Thumbnail may be a bit more complicated than you think. I do not use Lightroom, and only occasionally use the bridge.  I believe Lightroom and Bridge  keep thumbnails they develop for image files  in their library databases and caches.  Other programs do not have acces to  these.  RAW Files and Image files have Jpeg previews stored in then.  I believe most application use these previews jpeg to create thumbnails.  Jpeg format does not support transparency.
    Icon on the desktop are not always thumbnails some are embedded icons in application modules other are icon in dll these may well have transparency. However image file on the desktop have generated thumbnails.  However you can create a shortcut for an image png file and create a icon with a transparent background for the png file and change the shortcut's icon for the png file to the transparent ico file you created for it.
    Also many Photoshop release ago an Adobe module created Thumbnails for image files in Windows File explorer and most likely system file dialog. Adobe stopped supporting that stating Microsoft changes how windows works.
    Today I use FastPictureViewer Codec Package to generate image thumbnails for image files including RAW and PSD files in File Explorer and system file dialogs.
    I don't use a Mac don't know what available for your Mac.

  • Save  applet  as  images

    I create graphical report using jfree chart . it gives output in applet now i want to save applet as jpg image .
    is it possible ?
    i tried but i got image contain only black color.
    here is my code.
    package com.webaccess.wasurvey.action;
    import com.lowagie.text.Image;
    import java.awt.image.BufferedImage;
    import java.awt.image.ImageObserver;
    import java.io.File;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import org.jfree.chart.ChartFactory;
    import org.jfree.chart.ChartPanel;
    import org.jfree.chart.JFreeChart;
    import org.jfree.chart.axis.CategoryAxis;
    import org.jfree.chart.axis.CategoryLabelPosition;
    import org.jfree.chart.axis.CategoryLabelPositions;
    import org.jfree.chart.axis.CategoryLabelWidthType;
    import org.jfree.chart.plot.CategoryPlot;
    import org.jfree.chart.plot.PlotOrientation;
    import org.jfree.data.category.CategoryDataset;
    import org.jfree.data.category.DefaultCategoryDataset;
    import org.jfree.text.TextBlockAnchor;
    import org.jfree.ui.ApplicationFrame;
    import org.jfree.ui.RectangleAnchor;
    import org.jfree.ui.RefineryUtilities;
    import org.jfree.ui.TextAnchor;
    import org.jfree.util.Log;
    import org.jfree.util.PrintStreamLogTarget;
    * A simple demonstration application showing how to create a horizontal 3D bar chart using data
    * from a {@link CategoryDataset}.
    public class BarChart3DDemo2 extends ApplicationFrame {
    // * JFREECHART DEVELOPER GUIDE *
    // * The JFreeChart Developer Guide, written by David Gilbert, is available *
    // * to purchase from Object Refinery Limited: *
    // * Sales are used to provide funding for the JFreeChart project - please *
    // * support us so that we can continue developing free software. *
    * Creates a new demo.
    * @param title the frame title.
    public BarChart3DDemo2(final String title) {
    super(title);
    // create the chart...
    final DefaultCategoryDataset dataset = new DefaultCategoryDataset();
    dataset.addValue(23.0, "Series 1", "London");
    dataset.addValue(11.0, "Series 1", "New York");
    dataset.addValue(12.0, "Series 1", "Istanbul");
    dataset.addValue(13.0, "Series 1", "Cairo");
    dataset.addValue(13.0, "Series 2", "London");
    dataset.addValue(19.0, "Series 2", "New York");
    dataset.addValue(19.0, "Series 2", "Istanbul");
    dataset.addValue(19.0, "Series 2", "Cairo");
    dataset.addValue(7.0, "Series 3", "London");
    dataset.addValue(9.0, "Series 3", "New York");
    dataset.addValue(9.0, "Series 3", "Istanbul");
    dataset.addValue(9.0, "Series 3", "Cairo");
    final JFreeChart chart = createChart(dataset);
    // add the chart to a panel...
    final ChartPanel chartPanel = new ChartPanel(chart);
    chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
    setContentPane(chartPanel);
    * Creates a chart.
    * @param dataset the dataset.
    * @return The chart.
    private JFreeChart createChart(final CategoryDataset dataset) {
    final JFreeChart chart = ChartFactory.createBarChart3D(
    "3D Bar Chart Demo 2", // chart title
    "Category", // domain axis label
    "Value", // range axis label
    dataset, // data
    PlotOrientation.HORIZONTAL, // orientation
    true, // include legend
    true, // tooltips
    false // urls
    final CategoryPlot plot = chart.getCategoryPlot();
    plot.setForegroundAlpha(1.0f);
    // left align the category labels...
    final CategoryAxis axis = plot.getDomainAxis();
    final CategoryLabelPositions p = axis.getCategoryLabelPositions();
    final CategoryLabelPosition left = new CategoryLabelPosition(
    RectangleAnchor.LEFT, TextBlockAnchor.CENTER_LEFT,
    TextAnchor.CENTER_LEFT, 0.0,
    CategoryLabelWidthType.RANGE, 0.30f
    axis.setCategoryLabelPositions(CategoryLabelPositions.replaceLeftPosition(p, left));
    return chart;
    public void saveimage()
    Image backbuffer;
    ImageObserver observer=null;
    BufferedImage bufferedImage = new BufferedImage (1000,100,BufferedImage.TYPE_INT_BGR );
    // BufferedImage bufferedImage = new BufferedImage ( 1000,100,BufferedImage.TYPE_INT_RGB );
    //      bufferedImage.createGraphics().drawImage( backbuffer, 0, 0,this);
    bufferedImage.createGraphics().drawImage(bufferedImage, 10, 60,observer);
                   try {
                   ImageIO.write( bufferedImage, "jpg", new File ( "image.jpg" ) );
                   } catch (IOException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
    * Starting point for the demonstration application.
    * @param args ignored.
    public static void main(final String[] args) {
    Log.getInstance().addTarget(new PrintStreamLogTarget());
    final BarChart3DDemo2 demo = new BarChart3DDemo2("3D Bar Chart Demo 2");
    demo.pack();
    RefineryUtilities.centerFrameOnScreen(demo);
    demo.saveimage();
    demo.setVisible(true);
    }

    Hi Pradip, its very simple to save the applet as PNG or JPEG. Firstly u dont have to create a function
    saveimage() as u did. delete it. Instead, in the createchart function after the code --------
    final JFreeChart chart = ChartFactory.createBarChart3D(
    "3D Bar Chart Demo 2", // chart title
    "Category", // domain axis label
    "Value", // range axis label
    dataset, // data
    PlotOrientation.HORIZONTAL, // orientation
    true, // include legend
    true, // tooltips
    false // urls
    //append the following code to it
    try {
         ChartUtilities.saveChartAsJPEG(
    new java.io.File("C:/hi.JPEG"), chart, 800, 300);
         } catch (java.io.IOException exc) {
         System.err.println("Error writing image to file");
    //then continue with the rest...BINGO!!! its done...

  • How to save a drawn image in our own format

    hai,
    i'm developing a designing tool. in that user can draw any type of diagrams. i have to save the drawn image in my own extention... how can i do it. provide me some sample code if u can...

    mituli wrote:
    Thanks,
    but I am using Image.getScaledImage() to get scaled image(obviously). This returns an Image object. When I call getGraphics() on this object it throws an exception:
    Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: getGraphics() not valid for images created with createImage(producer) at sun.awt.image.ToolkitImage.getGraphics(ToolkitImage.java:292)Try using createGraphics() instead.
    In javadoc i found out that this method can be used only on off-screen image. What is off-screen image?Use BufferedImages, you'll have a lot less problems.
    Anyway I can't use this object in ImageIO.write because it requires RenderedImage object which can only be BufferedImage object.
    I tried to cast Image to BufferedImage but can't be ... If you need to get your Image painted onto a BufferedImage, you can do it like this:
    BufferedImage bi = new BufferedImage(myImageWidth, myImageHeight, BufferedImage.TYPE_INT_RGB);
    Graphics2D  g = bi.createGraphics();
    g.drawImage(myImage, 0, 0, null);

  • How to save a awt image in SVG file?

    hi all,
    Can anyone please tell me how to store a awt Image to an SVG file....
    For this i tried to change the awt image to outputstream, But I couldnt do that.
    As i am using some licensed software if i able to convert the awt image to output stream then my work will be done... can u please help me out in this..
    regards
    Mohanraj.K
    chennai

    javax.imageio API allows you to write/create a jpeg/png/bmp/wbmp ... image format. I don't think there's support for svg. you'll have to look for some third party plugin.
    Thanks,
    Kannan

  • How to save content of JPanel into jpeg or png file

    I have to independent classes: Class A and Class B. Each class constructs its own graphical objects:
    Class A {
    //do something
    public void paintComponent(Graphics g)
    int x = 0;
    int y = 0;
    int w = getSize().width;
    int h = getSize().height;
    bi = new BufferedImage(
    w,h,100,BufferedImage.TYPE_INT_RGB);
    g2d = bi.createGraphics();
    // draw lines
    g2d.drawImage(bi,0,0,ww,hh, this);
    Class B {
    int x = 0;
    int y = 0;
    int w = getSize().width;
    int h = getSize().height;
    bi = new BufferedImage(
    w,h,100,BufferedImage.TYPE_INT_RGB);
    g2d = bi.createGraphics();
    // draw lines
    g2d.drawImage(bi,0,0,ww,hh, this);
    Two buffered images get properly displayed within JPanel component. However, I need to save two those results into one file. If I add saving file routine into every class, at best I can only get them to be in two different files.
    Please let me know if anyone can help me with this problem.
    Thanks,
    Jack

    You didn't mention what should be the format of file that the combines the images. Here are two options:
    1. Create another BufferedImage, and draw the BufferedImages from class A and B over this BufferedImage and save it as JPEG or PNG.
    In each of the class, you can add a method like getBufferedImage(), which would return the local BufferedImage. A third class, say class C, needs to call this method in each of the classes, and then draw the BufferedImages returned by these methods over another BufferedImage. Save this BufferedImage as a JPEG or PNG.
    A disadvantage of this approach is that you can't easily retrieve the individual images from the resulting file.
    2. Create a single zip file by adding the individual JPEG/ PNG images created from the BufferedImage in class A and B.
    Here is an example that creates single zip file of JPEG images from an array of BufferedImageObjects:
    public static void zip(String outfile, BufferedImage bufimage[]){
         if(bufimage == null) return;
         try{
             File of = outfile.endsWith(".zip")? new File(outfile): new File(outfile+".zip");
             FileOutputStream fos = new FileOutputStream(of);
             ZipOutputStream zos = new ZipOutputStream(fos);
             for(int i=0;i<bufimage.length;i++){
                 try{
                    ByteArrayOutputStream boutstream = new ByteArrayOutputStream();
                    JPEGImageEncoder enc = JPEGCodec.createJPEGEncoder(boutstream);
                    enc.encode(bufimage);
    ZipEntry entry = new ZipEntry("bufimage"+(new Integer(i)).toString()+".jpg");
    entry.setMethod(ZipEntry.DEFLATED);
    zos.putNextEntry(entry);
    byte[] fileBuf = boutstream.toByteArray();
    zos.write(fileBuf,0,fileBuf.length);
    zos.closeEntry();
    } catch (Exception e){ e.printStackTrace();}
    zos.flush();
    zos.close();
    }catch(Exception e) {e.printStackTrace();}
    The above method uses the JPEG codec and the zip package, both of which available in J2SE. In other words, you need to import com.sun.image.codec.jpeg and java.util.zip packages.
    With this approach, you can easily retrieve the individual JPEGs using the java.util.zip package.

  • How to save a background image on a mac?

    I want to save a background image on this webpage
    http://www.twitterbackgrounds.com/tiled-twitter-backgrounds
    when I used windows i would just rt click and save background and it would save only the background. when i do that with the mac it saves the whole page. can anyone help me. i can fine any help online. I am new to a mac. alexandra.

    HI,
    Go here and check out the bottom right side of the page.
    http://www.twitterbackgrounds.com/tiled-twitter-backgrounds
    Use their e-mail to ask if their images are Mac OS X friendly and if so which Mac OS X version.
    Please click My Settings right side of this page and tell us which Mac OS X your MacBook is running.
    Thanks! Your forum profile is important... it helps us to help you.
    Please do not post twice for the same topic.
    http://discussions.apple.com/message.jspa?messageID=10578998#10578998
    Carolyn

  • How can you convert an image to ydbr format?

    Hello all. I can not work out how to simply input an image and convert it to ycbr and save it as a new image.
    Can anyone help please?
    Kind Regards

    OK I have also found this code:
    public static void rgb2ycbcr(int r, int g, int b, int[] ycbcr) {
              int y = (int)( 0.299 * r + 0.587 * g + 0.114 * b);
              int cb = (int)(-0.16874 * r - 0.33126 * g + 0.50000 * b);
              int cr = (int)( 0.50000 * r - 0.41869 * g - 0.08131 * b);
              ycbcr[0] = y;
              ycbcr[1] = cb;
              ycbcr[2] = cr;
    However I have no idea of how to use it. The source did not specify what all the parameters are. How can I use this in my code from a bufferedimage to displaying the new image?
    Thanks again.
    Looking forward to your answers (3 more Dukes added)

  • How to Save Pdf file in a particular format

    Hi Experts,
                        Can anybody tell me how to save a pdf file in a particular format,My requirement is i have a print button in webdynpro ,when ever user clicks on print ,adobe form is opened ,if user clicks on save .Form is saving with adobe form name .My requirement is it should be saved as ID NO.Date.Pdf  form lets Id is 0456 ,form should be saved as 0456.040614.pdf format, Thanks in Advance
    Regards
    Sandesh

    Hi Sandesh,
    Please provide the complete code from print & save button.
    Thanks & Regards,
    Balamurugan G

  • HOW TO SAVE A SCANNED FILE IN PDF FORMAT

    I HAVE A HP LASER JET M1005MFP PRINTER...
    HOW CAN I SAVE A SCANNED FILE IN PDF FORMAT..???
    PLEASE HELP AS SOON AS POSSIBLE AS IT IS URGENT.

    To get your issue more exposure I would suggest posting it in the commercial forums since the LaserJet M1005 is a commercial product. You can do this at Commercial Forums.
    I hope this helps!
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

Maybe you are looking for