Image object compression

How do I compress an image object?
I need it to be fast, as I want to send it over the network using socket.
I have already tried GZIP but got the error "Not in GZIP format".When I use GZIP the code runs for a while and then gives the error I stated above.
I have also used Inflater and Deflater. It reduces the size of my image object but I did not get any improvement in speed.It is basically a code for bandwidth utilization.
I need some help a.s.a.p.
Thanks.

bandwidth is not an issue now. I am actually doing a
project on thin client and for my demo i need
improvement in speed.1) If bandwidth not the issue, then don't use compression, since you don't need it (yet)
2) I bet there are at least five other, more critical performance bottlenecks in your code
3) Maybe you should think about your design. Why not give the processed data to the client and have it draw the image itself, instead of having the server creating the image and sending it to a client?
Or are you trying to create some Citrix-Metaframe-like terminal?

Similar Messages

  • How to Compress non-image object in Acrobat 9 Pro/Acrobat X Pro

    Hi,
    I am newbie and don't know where to post this question exactly. Forgive me if I am incorrect.
    How can we compress "non-image object" in "Acrobat 9 Pro/Acrobat X Pro"
    Thanks in advance for your suggestion & help.
    Thanks & Regards,
    Raja. S

    Thanks for the reply.
    I want to compress the "non-image" objects (i.e pagragraph contents and not images) for the entire PDF file in the "Acrobat pro X" application manually and not with the tool.
    Please share me if you have any idea on this.
    Thanks,
    Raja. S

  • How to compress non-image object streams using maximum compression in acrobat x pro

    How to compress non-image object streams using maximum compression in acrobat x pro
    Please provide the screenshot if possible. Thanks!

    ZIP is the best compression for non-image streams, and it will almost certainly already have been used.

  • How do i convert an image object to a byte array ?

    Hi
    how do i convert an image object into a byte array
    early reply apperciated

    Oh sorry my method and the other method need to have the pixels from the Image passed to them which you get my using pixelgrabber:
    //create width and height variables from image
              int w = img.getWidth(this);
              int h = img.getHeight(this);
              //retrive picture from image
              int[] pix = new int[w * h];
              PixelGrabber pg = new PixelGrabber(img, 0, 0, w, h, pix, 0, w);
              try{ pg.grabPixels();
              } catch (InterruptedException ioe) {
                   System.err.println("Interrupted");
              if ((pg.getStatus() & ImageObserver.ABORT) != 0) {
              System.err.println("image fetch aborted or errored");
              }

  • Converting JPanels as image objects

    hi,
    i am having problem in converting a JPanel object which consits of some
    JLabels and images into a Image Object. Actually i want to save the JPanel as
    a jpg file which i will do with jped encoder.
    so please help me in converting this JPanel to image object

    assuming the panel is showing.... (if not, you might need to user getPreferredSize() and setVisible before paint()).
    Dimension size = panel.getSize();
    BufferedImage bi = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_ARGB);
    Graphics2D g2d = bi.createGraphics();
    comp.paint(g2d);

  • Resizing Image objects to keep inline with JFrame width?

    Hi,
    just wondering if you had a GUI with an image in it, how you would code an image object to resize itself to keep its scale relative to the JFrame its in, if that frame was being resized by the GUI user?
    Thanks!

    Previously I'd say just use getScaledInstance() on the image. Then I read this article: [The Perils of Image.getScaledInstance()|http://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html]

  • Save an Image object into a XML text document

    ello:
    I have a problem with saving an image. I need to encapsulate it into two XML tags:
    <Image> xxxxxx </Image>
    The "xxxx" must be a String that represents my Image object.
    In J2ME I haven't serialization, and all the examples about "manual serialization" works with primitive types :(
    I've already read that I can do .getRGB() over my Image object, and obtain an array of int, wich represent each pixel. Ok, I can transform the array into a String, and write it in my XML text document, but later: how I obtain my array from that String?
    Thak you very much

    private Image img;
    byte rgb[] = null;
    private rgbLength; // get lenth of your string
    rgb = new byte(rgbLength);
    rgb = ... //load data from string to this array
    img = createRGBImage(rgb, int width, int height, false) ;You must know length of your string and must encapsulate in to XML width and height of this image;

  • Add image/object in HTML Editor Standard item (apex 3.2)

    Hi,
    I'm using the HTML editor standard item from Apex3.2.
    I want the possibility to add an image/object in the editor, but I don't see that option on the HTML editor standard item.
    How do I activate this option? Can someone help me out please?
    I've found something on:
    http://www.inside-oracle-apex.com/enable-add-picture-for-html-editor/#high_1
    Is this the only & easiest solution?
    Thanks,
    Sunenny
    Edited by: Sunenny on Feb 2, 2010 4:32 AM
    Edited by: Sunenny on Feb 2, 2010 4:33 AM

    Sunenny,
    Yes, it would take something like that. Another option, although not any easier really, it to use the latest CKEditor.
    Regards,
    Dan
    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/

  • How to display "Image" object in the browser?

    can anyone please tell me how can i display "Image" object in the browser?
    I have an image object that i retrieved from AS400 BLOB object by using toolbox.jar (for as400 access for java including all necessary classes like jdbc driver, security etc.).
    i want to display this object in the browser so i will be able to web-enable my BLOB objects stored on as400.thx...

    In your HTML:
    <img src="ImageServlet">
    In ImageServlet:
    Make calls to DB to get your image as byte array and store it in:
    byte[] buffer = new byte[imageSize];
    ServletOutputStream out = response.getOutputStream();
    for(int i = 0; i < imageSize; i++)
    out.write(buffer, i, 1);
    out.close();

  • Moving Images objects to another tree

    Is it possible to move or recreate the workstation image object from one
    tree to another. I'm migrating from an NW6 SP5 cluster to NW6.5 SP4
    cluster. Zen 4.0.1 IR7 has already been installed.

    [email protected] wrote:
    > Is it possible to move or recreate the workstation image object from one
    > tree to another. I'm migrating from an NW6 SP5 cluster to NW6.5 SP4
    > cluster. Zen 4.0.1 IR7 has already been installed.
    not any supported ways.. you could take a look at coolsolutions for some
    edir tools
    If you have already compiled drivers or have linux.2 please put them on
    http://forge.novell.com/modules/xfmo...ect/?zfdimgdrv
    Live BootCd and USB Disk from Mike Charles
    http://forge.novell.com/modules/xfmod/project/?imagingx
    eZie http://forge.novell.com/modules/xfmod/project/?ezie
    Marcus Breiden
    If you are asked to email me information please change -- to - in my e-mail
    address.
    The content of this mail is my private and personal opinion.
    http://www.edu-magic.net

  • Load jpg in image object

    Hi, i'm trying to create an image object from a jpg file:
    public static void main(String[] args)
    Image img;
    Toolkit t;
    t = Toolkit.getDefaultToolkit();
    img = t.getImage("C:\\Documents and Settings\\m.lipreri\\Desktop\\ciao.jpg");
    System.out.println("img: "+img.toString());
    Frame f = new Frame("Es1_Im");
    ImageFrame IM = new ImageFrame(f,img);
    IM.addWindowListener(new WindowAdapter(){
    public void windowClosing(WindowEvent e){
    System.exit(0);
    IM.setSize(500,400);
    IM.setVisible(true);
    class ImageFrame extends Frame{
    Frame f;
    Image im;
    //costruttore
    ImageFrame(Frame f,Image im){
    this.f = f;
    this.im = im;
    public void paint(Graphics g){
    g.drawImage(im,0,0,this);
    }but this code doesn't show me anithing in the applet, the image path is right, i've tried to past the path in my browser and i can see the image.
    thnx

    Images get loaded asynchronously, so the image
    probably isn't loaded completely when you try to
    display it. See java.awt.MediaTracker or use
    javax.swing.ImageIcon for loading.I could be wrong, but isn't that the ancient way of doing it? I haven't used MediaTracker in ages. Just use ImageIcon. It's the easist way I know to work with images.

  • How to save image using an image object in servlet on web server

    I'll be very thankful to anyone who helps me in this matter.
    i developed an applet which draws on a buffered image.
    now i want to save this buffered image as a jpg image on the web server.
    i know i have to use servlets or jsp for this.
    but i want to use servlet for specific reasons.
    can anyone plz provide me the code for taking an image object from an applet and saving it thru servlet.
    i need this solution as soon as possible.
    thanks in advance.

    Take a look around for URLConnection, and Applet to Servlet communication (also check the [url http://forum.java.sun.com/forum.jsp?forum=33]Servlet forum).
    Basic concepts will be to open a URLConnection to the URL mapped on your server for the servlet, then send the image, byte by byte, to the servlet, then ask for a reply from the servlet.
    Once asked for a reply the servlet will need to take the image sent to it (hopefully via an HTTP post) and copy it to a location on disk. (You could have a parameter to the request that tells you want to name the file...)
    As for the converting buffered image to JPEG, I haven't done this before, but I know others have. You can look around (more likely to find it in the [url http://forum.java.sun.com/forum.jsp?forum=31]Java Programing[ul] forum) for the code needed.

  • I can't find the image object menu item when trying to add an image placeholder in dreamweaver cs6

    I am new to dreamweaver, and am walking through some tutorials.  I can't seem to find the image object menu item to place a image placeholder on my page.  Any suggestions?  Do I have a setting that is currently hiding its visibility?  Thanks  (I am currently working with dreamweaver cs6)

    They removed it in the new Cloud version of DW CS6.
    http://blogs.adobe.com/dreamweaver/2012/10/dreamweaver-creative-cloud-update-12-1-faqs.htm l

  • Converting an Image object to a BufferedImage object?

    I have a BufferedImage object, bi, which I want to resize, hence:
    Image image = bi.getScaledInstance(400, 300, Image.SCALE_DEFAULT);
    Next I want to encode the resized image to JPEG format. The problem is that inorder to use the JPEGImageEncoder.encode() method, I need to pass it a BufferedImage object. I have looked through the API and cant see a way of converting the Image object to a BufferedImage object.
    Can anyone shed some light on this problem?
    Any help will be much appreciated.

    I copied + pasted the code from:
    http://java.sun.com/docs/books/tutorial/2d/problems/ind
    x.html :-)
    So you propably could use :
    int width = 400;
    int height = 300;
    Image image = bi.getScaledInstance(width, height,
    Image.SCALE_DEFAULT);
    BufferedImage bi = new BufferedImage(width, height,
    BufferedImage.TYPE_INT_RGB);
    Graphics2D biContext = bi.createGraphics();
    biContext.drawImage(img, 0, 0, null);Greets
    PuceThis works fine; but has anybody else noticed this takes an unreasonable amount of time? How to get around this?

  • Get an Image object

    hello :)
    My problem is that, i am trying to draw an image in a JPanel, but i cant get the object (Image) i want to use, cause i dont know if swing has any Image object creator like Applets getImage or Toolkit getImage.. and i want to do this without using Toolkit.getDefaultToolkit().geImage(URL)
    Tank u for your help.

    It is better to load images using .....getClass().getResource(....) i.e.
    ImageIcon i = new ImageIcon(getClass().getResource(url));
    With this approach the url can be CLASSPATH relative and the image can be in a jar (the same
    jar as the class loading it).
    Hope that helps you

Maybe you are looking for

  • How to change number format in web reports

    Hi, Experts,     Simple question, if I want to change the number format on web report as following . . . . . . . . Actual . . . . . . . . *1000SGD    new order   .   341.5   sales       .   567.45 if I click "Actual" then select properties, set data

  • Re-sorting order...a little goofy

    Hello all, Re-sorting your picture order seems to act differently depending on how your viewing in the Library. Looking at a grid under a keyword, you can not re-sort your picture order? Looking at a grid under "picks only", when you drag and drop ev

  • Finish date in process order

    Hi all,     I  have create a process order manually by giving shedulling type current date and schedulle margin key is set with no floats...Now in schedulled date the operation is completed today,but the  finish date is shown as tomorrows date....Can

  • Issue with aflobbld.sql for FND_LOBS_CTX creation

    Hi All, As part of the post patching instruction for patch 350000 we started the script aflobbld.sql which ran for about 2days and then we cancelled it. Later we dropped the index and reinitiated the script. Now the script fails with the below error

  • I can't publish my site with an existing domain.

    I bought a domain from www.nominalia.com, and I can't, or don't know how to, publish my website. Nominalia updated the DNS to this: NS1.WORLDSECURESYSTEMS.COM 54.236.190.129 NS2.WORLDSECURESYSTEMS.COM 54.246.209.121 NS3.WORLDSECURESYSTEMS.COM 54.252.