ImageSnapShot and Alchemy Jpeg encoder

Hi!
I was trying to figure out how can i use the Alchemy JPEG encoder with ImageSnapShot to capture image and encode with Alchemy encoder
If you see the ImageSnapShot function to capture is:
     var jpg : JPEGEncoder = new JPEGEncoder();
     var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(image, 0, jpg);
I want to capture a BIG screen, using JPEGEncoder its impossible beacose times of encoding.
So, some can anyone that had worked with this tell me if its possible?
Thanks in advance
And excuse about my english =)

I have just put up a tutorial/guide on how to use the Alchemy JPEG encoder in Flash. It's also an example on how to use a progressbar to monitor the encoding. Check out http://last.instinct.se/graphics-and-effects/using-the-fast-asynchronous-alchemy-jpeg-enco der-in-flash/640

Similar Messages

  • Jpeg encoding

    Hi
    I wondered if someone could help.
    I am working on an app that allows people to manipulate
    images and have them passed to the server to be sent or stored. I
    have all the basics working here and the jpeg encoded data being
    passed to the server etc. All works well.
    However, my next hurdle is how to pass multiple encoded files
    in what shot? As the user can say have 5 images that they can make
    in one session, to create a simple animation. Is there a way of
    packaging multiple bytearrays up and for php to sort them out on
    the server?
    I avent had much experience with byte arrays so any pointers
    would be great.
    regards
    ade

    the jdk library is open source. did you look for the jpeg encoder?
    package com.sun.image.codec.jpeg

  • JPEG ENCODING AND DECODİNG WITH DCT TRANSFORMATION

    I NEED A JAVA SOURCE CODE JPEG ENCODING AND DECODİNG WITH DCT TRANSFORMATION ALSO QUANTIZATION. IT IS URGENT BECAUSE I WILL USE IT IN MY PROJECT AND I AM NOT GOOD AT JAVA . PLEASE I AM WAITING YOUR HELPS. MY MAIL IS [email protected] thank you very much

    I NEED A JAVA SOURCE CODE JPEG ENCODING AND DECOD�NG WITH DCT TRANSFORMATION ALSO QUANTIZATION. IT IS URGENT BECAUSE I WILL USE IT IN MY PROJECT AND I AM NOT GOOD AT JAVA . PLEASE I AM WAITING YOUR HELPS. MY MAIL IS [email protected] thank you very much

  • Is there a JPEG encoder for j2me, PNG,GIF and BMP encoders are also wanted.

    As is known that, image encoders are not currently available in MIDP. I have tried to port a j2se JPEG encoder to J2ME, but it cost me 32M memory when generating a 800x600 image. Could anyone help me. Thanks

    well, of course ... what did you expect?Hum, I want to do some processing on my pictures, such as rotation, and then save it or send to my friends via MMS. but it's not easy to save the processed pixels to image file, such as JPEG, GIF or PNG.

  • ImageSnapshot and PNGEncoder in Flash

    As usual I've come across something easy to do in Flex but not in Flash. Flex
    has ImageSnapshot and PNGEncoder to get a .png out of a display object.
    I was wondering if there were any way to do this in flash without using a 3rd party API
    as I can't distribute a license with my app.
    I'm using Flash CS5. I wish there was as much support for Flash as there is for Flex.
    I've had to write my own tree component, if I'd have used Flex I could have just used the
    Flex tree component. I'm hoping I don't have to write my own display object to png class
    myself.
    Cheers,
    Alex.

    The AS3 core lib has a jpeg encoder, png encoder and some other nice utility classes.
    http://github.com/mikechambers/as3corelib
    Been around for years...

  • Problems with JPEG encoding

    I'm making photo album on the web. But I have a problem with thumbnails generation. I have read alot about it on this forum (thanks guys) but I have a problem:
    Sometimes (but not every time) and independent on the image I've got thumbnail picture that can not be readed neither by IE or Photoshop or another programm. I'm using next encoding sequence:
    PEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    com.sun.image.codec.jpeg.JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bufferedImage);
    writeParam.setCompressionMode(JPEGImageWriteParam.MODE_EXPLICIT);
    param.setQuality(0.7f, true);
    encoder.setJPEGEncodeParam(param);
    encoder.encode(bufferedImage);
    And this code operate in the Servlet enviroment. So, I can not understand what is wrong?
    Renat.

    Hi Renat.
    I may be wrong but I have observed some troubles with JPEG encoding (particularly because of a lack of CPU)... You may have the same trouble... The problem is that I don't how to catch these errors but if someone knows how to, I would be really interested in... I can only catch them when I decode these images thanks to TruncatedFileException and ImageFormatException.
    Stephane.

  • Jpeg Encoding Problem

    Hello,
    I have an applet that reads a data file and plots a graph. Now i'm having problem converting the graph into a jpg file using a jpeg encoder.
    I have the following snippet of code in the end.
    File file = new File("c:\\vj\\graph.jpg");
         if (file.exists()) {file.delete();}
         try {file.createNewFile();} catch (IOException eIo) {}
         try
         OutputStream out = new FileOutputStream( file );
         Image image = (Image)chart2D.createImage(chart2D.getWidth() ,chart2D.getHeight());
         Graphics g = image.getGraphics();
         chart2D.paint(g);
         BufferedImage bufImage = (BufferedImage)image;
    //     JPEGEncodeParam jep = new JPEGEncodeParam();
         JPEGImageEncoder jencoder = JPEGCodec.createJPEGEncoder(out);
         jencoder.encode(bufImage);
         out.flush();
         out.close();
         } catch (IOException e) {}
    But when i run the applet it gives me a security exception saying:
    java.security.AccessControlException: access denied (java.io.FilePermission c:\vj\graph.jpg read)
    How do i fix this problem??
    Any help would be appreciated,
    Thanks,
    Mamtha.

    Unfortunately, you can't do file I/O from an applet unless it is a signed applet. See applet security FAQ:
    http://java.sun.com/sfaq/
    If it's at all feasible, by far the simplest solution is to add a min method and make it an application instead of an applet. If it must be an applet, things get a little more complicated! Here are a couple of possibilities:
    1) You could sign your applet. For an example, see:
    http://java.sun.com/security/signExample/
    2) You can send the file to the server where the applet came from, and then have the server write it to disk. Finally, the client can request the file from the server. For an explanation and example code, see:
    http://java.sun.com/docs/books/tutorial/applet/practical/workaround.html

  • Info abt  jpeg Encoder

    hi
    i'm doing some image processing and i want to save tht processed image in mobile memory.I think to retrieve the processed image after storing needs some encoding format is there any jpeg encoder available or else v've have write our own encoder.
    and also is it possible to change the encoder in core java to j2me
    thanx in advance

    Hi nitin
    Manual accurals - you can post accurals manually in two scenarios when you are going to pay for lumpsum amount and when you are going for accurals correction
    when you enter the amount manually in VBo2 then a credit memo request is created . but these are not posted to FI as these are manual accurals and manual payments
    Manual payments - When you click on the payment data tab in VBo2 then you can  enter the value and the accural amount partially or fully and when you save a credit memo request is created . then you can do the billing and that accural amount is passed to FI
    Regards
    Srinath

  • Jpeg encoding in headless environment PLEASE HELP

    Hello, thank you so much for anyone that might be able to help me. If I am in the wrong forum, sorry.. please tell me where I need to go (I'm new here).
    I am running a servlet (tomcat 4.01 - JRE 1.4.1) that uploads jpg images and creates thumbnails from them in a headless environment. The images are created without a problem for some amount of time and then all the images created are black (but they are the correct size). I haven't figured out what the trigger is yet. The memory seems to be ok (5 - 20MB left depending on how big the upload is). The only think I can do to make the process work correctly again is to restart the server. I have written out the image to a file before converting it and the image uploads fine... just the resized thumbnail is black. I have seen other issues like this which say to use a MediaTracker but I have 2 questions about that:
    1) I don't have a component to use for the MediaTracker because I get a HeadlessException
    2) I save the uploaded content into a byte array before converting so, I should have it already, right?
    Below is the code I am using and any help would GREATLY appreciated. I thank anyone for taking the time to read this!
    import java.awt.Image;
    import java.awt.Graphics2D;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.io.FileOutputStream;
    import javax.swing.ImageIcon;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    // this is the image resizine method snippet
    public void resizeImage (int maxDim, byte[] imgContent, File outputFile) throws IOException {
         Image inImage = new ImageIcon(imgContent).getImage();
         int width = inImage.getWidth(null);
         int height = inImage.getHeight(null);
         double scale = maxDim / (double) height;
         if (width > height) scale = maxDim / (double) width;
         int scaledWidth = (int)(scale * width);
         int scaledHeight = (int)(scale * height);
         BufferedImage outImage = new BufferedImage(scaledWidth, scaledHeight, BufferedImage.TYPE_INT_RGB);
         AffineTransform tx = new AffineTransform();
         // If the image is smaller than
         //the desired image size,
         // don't bother scaling.
         if (scale < 1.0d) {
              tx.scale(scale, scale);
         // Paint image.
         Graphics2D g2d = outImage.createGraphics();
         g2d.drawImage(inImage, tx, null);
         g2d.dispose();
         // JPEG-encode the image
         //and write to file.
         FileOutputStream os = null;
         try {
              os = new FileOutputStream(outputFile);
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
              encoder.encode(outImage);
         finally {
              os.close();
    }

    Hello, thank you so much for anyone that might be able to help me. If I am in the wrong forum, sorry.. please tell me where I need to go (I'm new here).
    I am running a servlet (tomcat 4.01 - JRE 1.4.1) that uploads jpg images and creates thumbnails from them in a headless environment. The images are created without a problem for some amount of time and then all the images created are black (but they are the correct size). I haven't figured out what the trigger is yet. The memory seems to be ok (5 - 20MB left depending on how big the upload is). The only think I can do to make the process work correctly again is to restart the server. I have written out the image to a file before converting it and the image uploads fine... just the resized thumbnail is black. I have seen other issues like this which say to use a MediaTracker but I have 2 questions about that:
    1) I don't have a component to use for the MediaTracker because I get a HeadlessException
    2) I save the uploaded content into a byte array before converting so, I should have it already, right?
    Below is the code I am using and any help would GREATLY appreciated. I thank anyone for taking the time to read this!
    import java.awt.Image;
    import java.awt.Graphics2D;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.io.FileOutputStream;
    import javax.swing.ImageIcon;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    // this is the image resizine method snippet
    public void resizeImage (int maxDim, byte[] imgContent, File outputFile) throws IOException {
         Image inImage = new ImageIcon(imgContent).getImage();
         int width = inImage.getWidth(null);
         int height = inImage.getHeight(null);
         double scale = maxDim / (double) height;
         if (width > height) scale = maxDim / (double) width;
         int scaledWidth = (int)(scale * width);
         int scaledHeight = (int)(scale * height);
         BufferedImage outImage = new BufferedImage(scaledWidth, scaledHeight, BufferedImage.TYPE_INT_RGB);
         AffineTransform tx = new AffineTransform();
         // If the image is smaller than
         //the desired image size,
         // don't bother scaling.
         if (scale < 1.0d) {
              tx.scale(scale, scale);
         // Paint image.
         Graphics2D g2d = outImage.createGraphics();
         g2d.drawImage(inImage, tx, null);
         g2d.dispose();
         // JPEG-encode the image
         //and write to file.
         FileOutputStream os = null;
         try {
              os = new FileOutputStream(outputFile);
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
              encoder.encode(outImage);
         finally {
              os.close();
    }

  • NetBeans problem: Issue with servlets and Chinese character encoding

    Java Version: JDK1.5.0_01, JRE1.5.0_01 (International version)
    Netbeans Version: Netbeans IDE 4.0
    OS: Windows XP Personal Edition
    Dear Sirs,
    First at all thanks for reading this post. I am having the following issue. I am creating an application using html pages and servlets. I am using Chinese and English languages on them (html encoding UTF-8).
    I created a project in Netbeans and added an idex.html screen reporting to a servlet. Both index.html and in the servlet generated html page contains the line:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    Additional, I setup the character code settings in Netbeans:
    (tools-options-Java sources-Expert-default encoding=UTF-8
    When I run the project, index.html displays itself perfectly, with the Chinese characters displayed properly. The problem comes when the html created servlet is displayed, which instead of the Chinese characters some strange characters are displayed (�� instead of Chinese).
    I have tried different encodings from http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html without any luck. I also setup the encoding of the file itself (using right click-properties in the project menu of Netbeans).
    Also, when I am editing the servlet, the characters are displayed properly. I type them directly without any issue, but then the display is wrong at runtime.
    Also, just in case this have something to do with the problem, my PC was bought in US, therefore the default character set is not Chinese. I had to install the Chinese typing stuff later on. But like I said earlier, the html page is displayed properly, so I really think is some problem with Netbeans.
    After a week trying to find a solution, I decided to post it here in the hopes that someone will show me the way of the light.
    Thanks in advance for any ideas or help provided
    Aral.

    Ok, I found out some problems with Netbeans as well.
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response)
            throws IOException, ServletException
            response.setCharacterEncoding("UTF-8");
            request.setCharacterEncoding("UTF-8");
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            byte[] st = {-25,-75,-124,-27,-100,-106,-17,-68,-102,-27,-80,-113,-27,-72,-125,-26,-118,-75,-26,-105,-91,-27,-82,-93};
            out.println("this works: ");
            out.println(new String(st,"UTF-8"));
            out.println("<br>");
            out.println("this doesn't: ");
            out.println("some chinese copied from the Internet<br>");Right click the .java file and choose properties -> encoding UTF-8
    Then I make a copy of the .java file, rename it to html and open it with IE sure enough
    the Chinise is allready unreadable (not it's still readable in the IDE);
    When I compile the file with F9 I get the following error:
    whatever.java:101: warning: unmappable character for encoding Cp1252
    Tried to set the encoding to UNICODE but then the file doesn't compile.
    I gues you have to download the Japanese version for it to work correctly.

  • When I open my RAW files in Photoshop CC they are grainy and the JPEGS are not. What is going on? It doesn't seem to have anything to do with my CACHE levels either.

    When I open my RAW files in Photoshop CC they are grainy and the JPEGS are not. What is going on? It doesn't seem to have anything to do with my CACHE levels either.

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Premiere Pro and Adobe Media Encoder running slow

    Hello everyone,
    I'm having trouble with CS4, which is running significantly slower than CS3 did on a older machine. The CS4 suite is installed on a Dell Precision M6400:
    Windows Vista 64-Bit
    Intel Core 2 Duo CPU T9400 @ 2.53 GHz
    8 GB RAM
    NVIDIA Quadro FX 2700M Graphics with 512MB dedicated memory
    The OS is running on a 57.5 GB HD (C:) and the Adobe suite is installed on a 298 GB Solid State HD (D:), except for Adobe Media Encoder, which is installed on the C: drive.
    My project has 4 15-16 minute sequences. The sequences are in DV NTSC, 29.97 fps,  My scratch disks are set to a folder on the C: drive. Media Cache Files and the Media Cache Database points to a folder on the D: drive.
    These are some of the problems I'm having:
    - Premiere Pro CS4 generates peak files every time I open a project
    - It then takes 3-5 minutes to render before I can preview a 16-minute sequence
    - Adobe Media Encoder takes 5 hours to render a 16-minute sequence (as flv) that has been previously rendered
    - AME takes 1 hour to render every 15 minute sequence that has never been rendered before
    Are my settings affecting their performance? Is there any way to improve it? Thanks.
    (Premiere Pro is the only app that is slow)

    The data rate for replay is one thing, the data rate from disk to memory then from memory to CPU and back the other way are different matters and ought not to be confused. It is well-established that for a computer to edit AVCHD you need top end components, and note that I said there were three tasks to distinquish with increasing hardware requirements, namely merely replaying the video, specifying edits in the editor and then the rendering. It is commonly accepted by all the industry vendors that to do remotely commercial AVCHD rendering you need a minimum Quadcore CPU then that eats data fast, in order to not let it go to waste you need a fast motherboard bus fast memory and in order for none of those to go to waste you need the fastest disk set-up you can manage. I in fact have a 4-disk RAID0 volume using SATA (I think the disk model is SATAII but I have to await return from the repair center before I can confirm). For this RAID0 volume I have run speed test software from BlackMagic because I have one of their HDTV capture cards. It recorded that this volume which remember is doing parallelised IO is just fast enough to receive a encoded HDTV stream from the BlackMagic card but too slow to receive an uncompressed HDTV stream, indeed when I tried both I found the volume did keep up with compressed but fell behind with uncompressed. Remember that with a RAID0 volume of 4 SATAII disks a given file gets spread over the four disks and hence IO is spread over those 4 3G/s data lanes. Also remember with these disks 3G/s is just a burst speed, for AVCHD we are interested in sustained serial IO which is much less.
    Before my machine broke down, I found that it took 5 hours to render 33 minutes of HDTV albeit as it went along it transcoded from AVCHD to a Microsoft HD format for Vista-only. Another interesting thing is that I found that the longer this render ran the slower it became, the estimated time started at 3 hours but the actual was five and the last one third took maybe 3 hours. Because the machine broke after that run I couldn't figure the bottleneck. For my machine bear in mind that at the repair shop we found that the Quadcore had only half the necessary electrical power plugged in, the monitor software showed however that it constantly ran around 90% of whatever capacity that reduced power supply permitted. Now then we can puzzle over why it got slower and slower and yet CPU consumption remained consistent and near to full capacity, memory was not the bottleneck because that was constant at 6.4G. But you can say that this was maybe performing like a Dualcore and was hitting some sort of wall, if you had a 1 hour render with that rate of degeneration of performance factored in what would happen to the render time, and for 3 hours you could be running indefinitely. I hope when the machine comes back the correct power supply will make it behave like a Quadcore should for this type of application. Anyway I have two theories for the degradation. First is just that PrProCS4 was getting its knickers in a twist and thereby just doing more computation per minute of video to be rendered as time went by, maybe internal resource management related to OO-type programming maybe, or related to disk IO falling behind, both these theories have problems, for the latter the CPU usage should then have dropped also.
    Anyways, you need really a Quadcore system and blazing fast disk to work fully with AVCHD commercially, we found an external SATAII disk so if I were you I would just go get one and move on with your life.
    Message du 03/06/09 16:08
    De : "Jim Simon"
    A : "JONES Peter"
    Copie à :
    Objet : Premiere Pro and Adobe Media Encoder running slow
    For AVCHD you MUST have FAST disks.
    AVCHD actually has a lower data date than DV. You need lots of CPU muscle, but disk speed is really not a factor specific to AVCHD. Anything that works for DV will work just as well for AVCHD (and HDV as well).
    >

  • RAW and Exported Jpegs in same catalog

    I use lightroom to import raw files from my Nikon. Then i edit them and export the good ones to jpeg on my network share for viewing. When i import jpegs from my compact camera i import them directly to my network share. Before i always had the jpegs in to the same catalog just under the other path. But now with face recognitioning i get the face from both places with the exported ones. Is there a way to stack the jpeg with the raw file so that they only show once?

    Raw and Jpeg next to each other can be treated as the same file, but only if they are in the same physical folder and have the same name.
    Are your exported Jpeg files then re-imported into LR in a different folder? That's a problem for what you want to do (and in general I don't recommend reimporting duplicate images).
    LR could do a great job of managing your network share using a published folder, if you included the Jpegs from your compact camera on the loca folder along with the raw images. With publish services and a published folder, LR will create (and remove) Jpeg images in a managed location you choose, and you don't need to worry about reimporting duplicates.
    mh++

  • Problems when jpeg encoding multiple images

    Hi, im trying to write a servlet which generates multiple thumbs. However when encoding for the second time i get an error java.io.IOException: reading encoded JPEG Stream.
    I can't figure out the problem
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.awt.Image;
    import java.awt.Graphics2D;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import javax.swing.ImageIcon;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    public class Thumbs extends HttpServlet {
      private String dbDriver = "com.mysql.jdbc.Driver";
      private String dbURL = "jdbc:mysql://localhost/shopper?";
      private String userID = "javauser";
      private String passwd = "javadude";
      private Connection dbConnection;
      //Initialize global variables
      public void init() throws ServletException {
      //Process the HTTP Get request
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        try{
          String foreignNr = request.getParameterValues("p")[0];
          String maxDim = request.getParameterValues("s")[0];
          if (foreignNr != null){
            int foreignID = Integer.parseInt(foreignNr);
            int maxDimension = Integer.parseInt(maxDim);
            response.setContentType("image/jpeg");
            OutputStream out = response.getOutputStream();
            writeThumbnailPictures(out,foreignID,maxDimension);
        } catch (Exception ex){
            log(ex.getMessage());
      public void writeThumbnailPictures(OutputStream out,int foreignID,int maxDimension){
        try{
          Class.forName(dbDriver);
          dbConnection = DriverManager.getConnection(dbURL, userID, passwd);
          PreparedStatement pageStatement;
          pageStatement = dbConnection.prepareStatement(
              "select * from pictures where ForeignID = ?");
          pageStatement.setInt(1, foreignID);
          ResultSet recs = pageStatement.executeQuery();
          while (recs.next()) {
            byte[] data = recs.getBytes("Picture");
            if (data != null) {
              Image inImage = new ImageIcon(data).getImage();
              // Determine the scale.
               double scale = (double)maxDimension / (double)inImage.getHeight(null);
               if (inImage.getWidth(null) > inImage.getHeight(null)) {
                   scale = (double)maxDimension /(double)inImage.getWidth(null);
               // Determine size of new image.
               // One of them should equal maxDim.
               int scaledW = (int)(scale*inImage.getWidth(null));
               int scaledH = (int)(scale*inImage.getHeight(null));
               // Create an image buffer in
               //which to paint on.
               BufferedImage outImage = new BufferedImage(scaledW, scaledH,
                   BufferedImage.TYPE_INT_RGB);
               // Set the scale.
               AffineTransform tx = new AffineTransform();
               // If the image is smaller than
               // the desired image size,
               // don't bother scaling.
               if (scale < 1.0d) {
                   tx.scale(scale, scale);
               // Paint image.
               Graphics2D g2d = outImage.createGraphics();
               g2d.drawImage(inImage, tx, null);
               g2d.dispose();
               // JPEG-encode the image
               JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
               encoder.encode(outImage);
          out.close();
        catch(Exception ex){
          ex.printStackTrace();
      //Clean up resources
      public void destroy() {
    }

    Hi,
    I am facing same problem while generating the thumbs. Did you figure out what the problem is? if you have the solution, do post it.
    Thanks in advance
    Mo

  • Can I resize photos and reduce JPEG file sizes by using Photpshop Elements?

    Can I resize photos and reduce JPEG file sizes by using Photpshop Elements?

    Go to Image>Resize>image size.
    For purpose of web posting, go to File>save for web.

Maybe you are looking for