jpeg image compression using java source code

Discussion in 'Java' started by Avinash.Masal@gmail.com, Jan 2, 2008.

  1. Guest

    Urgent please.... how to compress a single jpeg image frame to
    maintain quality and half of it's original storage size using java
    source code.........
     
    , Jan 2, 2008
    #1
    1. Advertising

  2. Andrew Thompson, Jan 2, 2008
    #2
    1. Advertising

  3. wrote:
    > Urgent please.... how to compress a single jpeg image frame to
    > maintain quality and half of it's original storage size using java
    > source code.........


    public class JavaJPEGCompressor {
    public final static byte[] compressImage(byte[] image) {
    byte[] ret = new byte[image.length/2];
    System.arraycopy(image, 0, ret, 0, ret.length);
    return ret;
    }
    }

    Exactly half the size, but I don't think it's quite a legal image. It's
    also technically the same quality...

    Send me $10.00 in the mail immediately for your time ;-) .

    --
    Beware of bugs in the above code; I have only proved it correct, not
    tried it. -- Donald E. Knuth
     
    Joshua Cranmer, Jan 2, 2008
    #3
  4. Jeff Higgins Guest

    Avinash wrote:
    > Urgent please.... how to compress a single jpeg image frame to
    > maintain quality and half of it's original storage size using java
    > source code.........


    Please note the earlier replies.

    The Java Advanced Imaging Project

    <https://jai.dev.java.net/>

    advertises lossless JPEG plugins.

    <http://preview.tinyurl.com/3e5dm4>

    I have no experience with this API.
     
    Jeff Higgins, Jan 3, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stu

    Improving jpeg compression

    Stu, Jun 15, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    405
  2. Karsten Wutzke

    JPEG compression

    Karsten Wutzke, Jan 13, 2005, in forum: Java
    Replies:
    4
    Views:
    499
    Stanimir Stamenkov
    Jan 21, 2005
  3. Karsten Wutzke

    JPEG compression and quality level

    Karsten Wutzke, May 31, 2005, in forum: Java
    Replies:
    2
    Views:
    5,306
  4. Replies:
    1
    Views:
    3,107
    Victor Bazarov
    Feb 28, 2006
  5. lovaspillando
    Replies:
    0
    Views:
    1,065
    lovaspillando
    Aug 26, 2007
Loading...

Share This Page