Jpeg2000

Discussion in 'Game Development (Technical)' started by oNyx, Nov 13, 2004.

  1. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,211
    Likes Received:
    0
    Yesterday I took a first look at jp2. It's truely awesome. It's smaller than jpeg and it also looks much better (I mean the lossy mode). For example hard contrast edges don't end up in a mess of jpeg artefacts. 80% jp2s look pretty much perfect and it's about 20-25% of the size of a png.

    However, the patent stuff seems to be still pretty much unclear. I guess it's not used much for that reason.
     
  2. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Is there any OGG stuff in progress for image compression?

    Cas :)
     
  3. Karukef

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    15
    Likes Received:
    0
    While many are under the belief that JPEG2000 is under strict licenses and such, that is not actually the case. The group and major comapnies behind JPEG2000 have all granted use of the relevant patents without restrictions, so it IS a free format and you can even find a free encoder\decoder for it called Jasper. The only reservation is that there MAY be hidden patents that some obscure company has taken long ago just to fling it in people's faces at a later time. Worrying about this however is probably being a bit paranoid.

    Try JPEG2000 out. My experience with works wonders for textures and other "solid" images. Sprites - that is images that have large transparent parts and precise pixellated graphics - are much more suited to be losslessly compressed by LZMA (7-zip).

    Original License information, taken from http://en.wikipedia.org/wiki/JPEG2000

     
  4. Alex Saveliev

    Original Member

    Joined:
    Jun 8, 2005
    Messages:
    31
    Likes Received:
    0
    J2K-Codec

    You can also try our decoding component - J2K-Codec at
    http://j2k-codec.com

    It is very easy to use :)
     
  5. soniCron

    Indie Author

    Joined:
    May 4, 2005
    Messages:
    3,664
    Likes Received:
    0
    Or, we could use the open sourced Jasper for free, and easy to use. ;)
     
  6. Martoon

    Original Member

    Joined:
    Nov 5, 2004
    Messages:
    329
    Likes Received:
    0
    In one of their dev diaries (I'm too lazy to dig up the link), Moonpod talked about converting Starscape to use JP2000. They were very impressed by the quality to filesize ratio (it really is leaps beyond jpeg), but found that it decompressed too slowly for loading images in-game. So they have the decompression (to some other format) all done at install time.
     
  7. Phil Steinmeyer

    Original Member

    Joined:
    Mar 1, 2005
    Messages:
    757
    Likes Received:
    0
    Can you get Jpeg 2000 plugins for Photoshop? How 'bout for ImageMagick? Without support in one (preferably both) of those two, it would be rather hard for me to work with JPeg 2000.
     
  8. soniCron

    Indie Author

    Joined:
    May 4, 2005
    Messages:
    3,664
    Likes Received:
    0
    ImageMagick supports read/write of JPEG-2000 natively, and there are several Photoshop plugins for JP2K as well.
     
  9. Spaceman Spiff

    Original Member

    Joined:
    Apr 3, 2005
    Messages:
    137
    Likes Received:
    0
    One thing to rember when adding a new format to the mix - if you go to a lossy format, do it only once. So your toolchain / build process really needs to be able to support the end format. (i.e. don't save to JPEG then convert to JPEG 2000).
     
  10. soniCron

    Indie Author

    Joined:
    May 4, 2005
    Messages:
    3,664
    Likes Received:
    0
    And don't forget to check your code for typos! :p
     
  11. Alex Saveliev

    Original Member

    Joined:
    Jun 8, 2005
    Messages:
    31
    Likes Received:
    0
    Or you could figure out that J2K-Codec is up to 20 times faster, takes less memory and still more easy-to-use ;)

    Jasper sucks. Believe me, I wouldn't write this codec if JasPer were any good...
     
  12. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    <surfaces from hibernation>...is there a pure Java implementation of your decoder anywhere?

    Cas :)
     
  13. Alex Saveliev

    Original Member

    Joined:
    Jun 8, 2005
    Messages:
    31
    Likes Received:
    0
    I've created my codec especially for games and I'm actually using it; and the speed is fine...

    P.S. The platform is PC.
     
  14. Alex Saveliev

    Original Member

    Joined:
    Jun 8, 2005
    Messages:
    31
    Likes Received:
    0
    For Java you can try JJ2000 (http://jj2000.epfl.ch)
    But JPEG2000 on Java will be veeeery slooooow :)
     
  15. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Why's that then?

    Cas :)
     
  16. Phil Steinmeyer

    Original Member

    Joined:
    Mar 1, 2005
    Messages:
    757
    Likes Received:
    0
    Is there an easy way to use Jpeg 2000 with SDL?

    Will JPeg 2000 cause noticeably slower load/decompress times than regular old Jpeg?
     
  17. Alex Saveliev

    Original Member

    Joined:
    Jun 8, 2005
    Messages:
    31
    Likes Received:
    0
    First of all - because it's JAVA :)
     
  18. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    :S Won't get baited... tell that to my Java code.

    Cas :)
     
  19. Alex Saveliev

    Original Member

    Joined:
    Jun 8, 2005
    Messages:
    31
    Likes Received:
    0
    I didn't used SDL, but I'll try to help you to adapt our codec for it, if you are interested...

    JPEG2000 is slower than old JPEG - it is a fact. Though the difference for a player may be neglible, depending on your situation. You can simply download and try J2K-Codec - just to estimate the decoding slowdown. I am using it and perfectly happy with the speed :)
     
  20. Alex Saveliev

    Original Member

    Joined:
    Jun 8, 2005
    Messages:
    31
    Likes Received:
    0
    There is code and there is Code :)

    Moving packman around and performing full-scale wavelet and codeblock decoding is a bit different calculation tasks :)
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer