Compressing a Truevision Targa (.TGA) file.

Discussion in 'The Graphics Zone' started by Demonfaze, Oct 21, 2006.

  1. Demonfaze

    Demonfaze 8 yrs. Hell, it's been a long time.

    How do you compress a .tga file?

    I download a few programs off of google claiming to compress images, but they simply compressed images in the .jpg format, which is not what I need. If I use a program such as paint shop pro to "Save As.." an image into the .tga file, it increases in file-size massively. (about 13kb to 170kb)

    Thanks for the help.
  2. monoVertex

    monoVertex I'm back!

    I am not sure, but I don't think TGA can be compressed... but I am no expert, so don't trust this too much xD
  3. Demonfaze

    Demonfaze 8 yrs. Hell, it's been a long time.

    My friend compressed images for me perfectly, so I know it is possible. But I feel I need to learn how to do it on my own, since I've asked him to compress images so many times =/

    Basically I can start with any format (probably .JPG or .BMP) and I need to make a TGA file that is somewhat small in size.

    -----

    What I'm actually trying to do is make a mini-map preview for a warcraft 3 map that doesn't take up too much space. The JPG file is only 13kb; I want the TGA file to be as small as possible without losing much quality: preferrably less than 60kb in size. However, when I try to save it as a TGA, the filesize jumps up to about 180kb.
  4. The Helper

    The Helper Administrator Staff Member

    TGA has the option to save in RLE (Run Length Encoding) which will reduce the file size. source http://www.ftgimp.com/help/C/filters/tga.html

    Do you use the gimp?

    http://www.gimp.org/

    you can save rle tga in that program, you might need a plug in but you can get those by searching google - that should allow you to get smaller files.
  5. Demonfaze

    Demonfaze 8 yrs. Hell, it's been a long time.

    I just finished downloading the Gimp.

    I tried saving, putting a check on RLE compression, but it is still about 166kb.
  6. Husky

    Husky Local Lurker

    Have you tried reducing the quality? Or dont you want that?
  7. Demonfaze

    Demonfaze 8 yrs. Hell, it's been a long time.

    I want to reduce the quality, as long as it doesn't look too bad. I just don't know how or what to use to do so.
  8. Andrewgosu

    Andrewgosu The Silent Pandaren Helper Staff Member

    Well the thing is, you can't compress without losing any quality at all. The more you compress the more quality you will lose, nevertheless what the filetype is.
  9. Whitesock

    Whitesock Graphics Help Zone Moderator Staff Member

    But there is a certain percentage to where you can unreconizably (sp?) reduce the quality and greatly reduce the filesize. I think it's like 80~75'ish %.
  10. Demonfaze

    Demonfaze 8 yrs. Hell, it's been a long time.

    That's exactly what I want to do. I just want to learn how to compress something, but where I have the power to adjust how much percentage I want to compress it, and I can go from there through trial & error to find a balance between quality and size.
  11. Whitesock

    Whitesock Graphics Help Zone Moderator Staff Member

    You have compression options for .jpg's. Sometimes I turn it off and the filesize isn't too bad and the quality should look fine for what you're going for.

    Can you use .jpg's for minimap images?

    EDIT: Also, I think you can change the pixels per inch to save more space.
  12. AceHart

    AceHart Your Friendly Neighborhood Admin

    tgas aren't very compressible.
    At least not when it comes to w3. Chances are it will crash when trying to use it...

    If you're really worried about size, get a program like Warcraft 3 Viewer, which has the option to convert tga into blp.

    blp is, let's say, Blizzard's version of jpg.
    Highly compressible.
    The less you care for quality, the smaller it gets.

    And, yes, blp does work for minimaps.
    If you import it as war3mapPreview.blp.
  13. Whitesock

    Whitesock Graphics Help Zone Moderator Staff Member

    .jpg's compress much better then .blp's though. :p
  14. AceHart

    AceHart Your Friendly Neighborhood Admin

    > .jpg's compress much better then .blp's though.

    That remains to be seen.
    Either way, it easily beats tga.

    However, the big difference would be that w3 understands blp. And has no idea about jpg...

Share This Page