Announcement

Collapse
No announcement yet.

Coding question: Good way to handle TIF or TGA grafix in Java?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Coding question: Good way to handle TIF or TGA grafix in Java?

    The subject about says it all... Our art guy, Dominique says:

    As I said to Mark, neither GIF nor JPG are the ideal formats:

    JPG is lossy at for this reason alone a no-no. Furthermore, it's quality lessens with each "load-change-save" procedure, and you never know when you have to edit an image for the xth time (let alone making it harder for the players to edit their images).

    GIF can use only up to 256 colors - not a problem as such (AoE is done in only 256
    colors!), but MUCH harder to do convincingly for the artist - especially in a situation like ours, who are spread all over the world.

    Isn't there any way to import TIF or TGA? I'd even settle for BMP or IFF (both should be
    easy to use in your code).


    I don't know how to do this kind of stuff in Java, who knows how? And what are the limitations, losses in speed etc.

    Thanks,

    Mark
    Project Lead for The Clash of Civilizations
    A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
    Check it out at the Clash Web Site and Forum right here at Apolyton!

  • #2
    I guess if worse comes to worse we could use TIFF or TGA for design and user mods, and just convert to jpg to have the Java code run. Its a bit kludgey, but then at worst all we'd need to do is write one converter (if one's not already available).
    Project Lead for The Clash of Civilizations
    A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
    Check it out at the Clash Web Site and Forum right here at Apolyton!

    Comment


    • #3
      Sorry, Mark, JPG is a no-no; I'm sire you won't find a single professional game out there using JPG, maybe with the exception for large screenshots / illustrations. Ever wondered why that crappy old BMP format is use so often? Well, JPG doesn't allow for exact pixel placement, which is a MUST when dealing with small zile / unit graphics.

      A better, but by far not the best solution would be to use 256 color GIF graphics with their INDIVIDUAL palettes, i.e. the tiles are GIF, but the screen as a whole is 16 / 24 bit.

      But is it really THAT hard to use something different than GIF / JPG???

      Look what I have found:

      http://www.javacats.com/US/search/rid00003682.html
      Well, if we took the bones out they wouldn't be crunchy, would they?

      Comment


      • #4
        Dominique:

        Yes, the library you found looks great, and is clearly the way to go. I had searched for such a thing but didn't find anything useful. I withdraw my previous comments as they're clearly irrelevant.

        For others' info it says:

        JIMI - Java Image Management Interface 1.0.1(ClassLibrary)
        By Activated Intelligence, LLC

        JIMI gives Java the power to read & write numerous graphics file formats - JPEG, TIFF, PNG, GIF, BMP, PSD, TGA, PICT, PCX, XBM, XPM, RAS, ICO, CUR & more. JIMI is 100% Pure Java , compatible with JDK 1.1 and JDK 1.2 betas - free for non-commercial use.

        Congratulations. We will have to make sure the speed is ok using this library, but it looks good.

        -Mark
        Project Lead for The Clash of Civilizations
        A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
        Check it out at the Clash Web Site and Forum right here at Apolyton!

        Comment


        • #5
          I find an easy to use method to use BMP graphics wit java:

          http://www.javaworld.com/javaworld/j...javatip43.html

          Blade Runner
          Blade

          Comment


          • #6
            ...free for non-commercial use.
            Wouldn't that be a problem?

            Here is a GPL'ed class library from LizardWorks:

            http://www.lizardworks.com/java.html

            [This message has been edited by Rong (edited May 27, 1999).]
            The radical invents the views. When he has worn them out the conservative adopts them.
            - Mark Twain

            Comment


            • #7
              Hey Rong:

              We're not commercial yet... We only Aspire to Become So .

              Looks like the open-source discussion is going your way so far too! I'll actually need to Read the GNU license is it, at some point to see what potential it allows us if we go open.

              -Mark
              Project Lead for The Clash of Civilizations
              A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
              Check it out at the Clash Web Site and Forum right here at Apolyton!

              Comment

              Working...
              X