Post Reply 

Mass Resave Without RLE Compression

May 20, 2011, 23:04
Post: #1
Question Mass Resave Without RLE Compression
Simply wondering how possible it is, because we've got roughly 2400 files that need to be re-saved without RLE compression due to causing issues in the conversion process. A manual job would take quite a while. Big Grin

If there's no way of automating the process, is there any way of reducing the time of re-saving every image individually at all?
Find all posts by this user
Quote this message in a reply
May 21, 2011, 02:24
Post: #2
RE: Mass Resave Without RLE Compression
While this type of batch processing can be done in Gimp, it certainly wouldn't be my first choice and is probably not your best solution. Without knowing the current file format, the intended destination format, or what OS you're working on, it's kind of hard to say with any certainty which of these programs would be your best choice.

Probably the most powerful for this type of work would be GraphicsMagick or the very similar ImageMagick. The downside however, is that these are command line only programs and will require at least a little familiarity with working from the command prompt (or terminal). If you prefer to stay in a graphical environment, check out either XnConvert or IrfanView.

GraphicsMagick, ImageMagick, and XnConvert are available for Windows, Mac, and Linux. IrfanView is Windows only, but can support versions going back to Win 9x if that is a requirement.

I would also recommend that you copy a random sample of your images to a test directory and thoroughly test the converted files to work the bugs out of your process as well as to be sure of compatibility before committing yourself. And probably most important... as your very first step you should make backups of your image files.

[Image: viragogimpforumssig.png]
Find all posts by this user
Quote this message in a reply
May 22, 2011, 02:09 (This post was last modified: May 22, 2011 02:11 by Striped Sweet.)
Post: #3
RE: Mass Resave Without RLE Compression
Firstly, thanks for the speedy reply!

Essentially, we've got around 2400 .tga texture files of various sizes between 64x64 and 1024x1024 that have RLE Compression ON. However, RLE must be OFF in order to function properly for us, so the files should ideally be saved back into the .tga format, excluding the RLE compression.

I'm running Windows 7/Windows XP, but primarily the latter. I attempted using IrfanView earlier today, and initially, at least, it was highly promising, as RLE compression was removed on all textures. However, after some testing it appears that any transparency was completely removed, which made it rather problematic.

Admittedly I don't feel hugely capable in a command prompt environment, but I'm sure I know several individuals who can probably lend a bit of help on that side, so I'm too worried if it comes down to that.
Find all posts by this user
Quote this message in a reply
May 22, 2011, 04:02
Post: #4
RE: Mass Resave Without RLE Compression
It seems to me like you have a pretty good idea of what you are doing, and definitely seem to be on the right track at this point. The only thing left to do is keep testing the various possibilities until you find one that works for you. The next obvious choice would be XnConvert. This is a sister program to the popular XnView, just without the viewer and focused more on the batch conversion task.

One other consideration... is it actually a requirement to remain with the .tga format? As long as you're having to convert all of them, there would be no extra work involved in making them all .png files.

[Image: viragogimpforumssig.png]
Find all posts by this user
Quote this message in a reply
May 22, 2011, 14:45
Post: #5
RE: Mass Resave Without RLE Compression
I'll give XnConvert an attempt once I get back and report on any progress. Smile

Sadly, .tga files without RLE compression are an absolute requirement. They'll eventually be converted into the .dds format, but the .tga type will still be primarily used.
Find all posts by this user
Quote this message in a reply
May 22, 2011, 15:30
Post: #6
RE: Mass Resave Without RLE Compression
(May 22, 2011 14:45)Striped Sweet Wrote:  I'll give XnConvert an attempt once I get back and report on any progress. Smile

I played around with this some more last night and I think you will find that XnConvert has the same problem as IrfanView. The .tga files it saved had no compression, but it seemed to also strip out the alpha channel, removing any transparency. You might want to test it yourself just to make sure though.

The good news is that I did have better luck with GraphicsMagick. The output files had no compression, and still had their transparency intact. Of course I was just using a test file I created myself, so I don't know what else may have changed that would cause a problem with your process, but at least it's a step forward.

I'm using a Windows XP system and I installed the 32 bit version of GraphicsMagick in the default Program Files location. Create a directory of whatever name you like, I used "C:\oldfiles", and copy your test targa files into it (I'm assuming that they all have the .tga extension). You also need to create an empty sub-directory named "newfiles" (C:\oldfiles\newfiles\), this is where the converted files will end up. Open a command prompt window, change directories so that you are in c:\oldfiles, and run GraphicsMagick with this command:
Code:
gm mogrify -output-directory newfiles -format tga *.tga
You should be able to just copy and paste that line. That will at least get you some converted files to check. You can then delve further into GraphicMagick's manual if you want to adjust directory names or anything.

Good Luck! Smile

[Image: viragogimpforumssig.png]
Find all posts by this user
Quote this message in a reply
May 22, 2011, 22:25
Post: #7
RE: Mass Resave Without RLE Compression
XnConvert does indeed seem to be rather problematic - seems I got to this thread after resaving them all with it. Smile

I've converted the files as to your guide and initially it seems promising - once they finish uploading we'll see if they work, but it looks good so far, thanks! Smile
Find all posts by this user
Quote this message in a reply
May 22, 2011, 23:04
Post: #8
RE: Mass Resave Without RLE Compression
(May 22, 2011 22:25)Striped Sweet Wrote:  once they finish uploading we'll see if they work, but it looks good so far, thanks! Smile

You're quite welcome, I'm glad I could help. Smile

I also ran across something that may be of use to you. This site has a plugin for Gimp that lets you open and save dds files directly. Once you have them all converted, if you should need to edit one for some reason, you could do so without the need to convert it back and forth.

[Image: viragogimpforumssig.png]
Find all posts by this user
Quote this message in a reply
May 22, 2011, 23:55 (This post was last modified: May 22, 2011 23:55 by Striped Sweet.)
Post: #9
RE: Mass Resave Without RLE Compression
That's a really useful plugin too, much appreciated! Great for checking up on the converted files, too. Big Grin
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Excessive compression in exported files? LiamRowan 5 337 Aug 13, 2014 21:23
Last Post: LiamRowan

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS