Rabain Posted December 11, 2007 Share Posted December 11, 2007 I was thinking that it might be possible to drop the portraits into the Portraits folder instead of the Override, thus reducing the overall size of the Override. Or would the same portraits in the Portrait folder cause the same amount of work for the engine? Will portraits in the Portrait folder work for characters other than Player1? Link to comment
Miloch Posted December 11, 2007 Share Posted December 11, 2007 The portraits folder functions as an override folder, so yes, it should work to put them there. I'm not sure if it'll cause less work on the engine, but portraits is checked before override, and at least you're avoiding bloating the override folder even more, so that's the way I'd do it too. GraphicsMagick should work for command line GIF>BMP conversion, and a bunch of other formats. And it's Linux, Windows and OS X compatible. Link to comment
Steve Posted December 11, 2007 Share Posted December 11, 2007 ImageMagick Studio lets you modify and convert images online: http://studio.webbyland.com/ImageMagick/Ma...agickStudio.cgi Link to comment
Miloch Posted December 11, 2007 Share Posted December 11, 2007 Yeah, that's not really what we're looking for. We need a command line utility to deliver with the mod for the sole purpose of converting compressed GIFs to uncompressed BMPs. I've found a few different options that work, just a matter of finding the best, which probably means the smallest file size. No sense in delivering a 4 MB file to do the conversion when you're not even going to save that much space by using GIFs instead of BMPs. The "convert" command should be resident on most OS X and Linux installs, so we just need to cover Windows probably. Link to comment
ericp07 Posted December 11, 2007 Share Posted December 11, 2007 The portraits folder functions as an override folder, so yes, it should work to put them there. I'm not sure if it'll cause less work on the engine, but portraits is checked before override, and at least you're avoiding bloating the override folder even more, so that's the way I'd do it too. GraphicsMagick should work for command line GIF>BMP conversion, and a bunch of other formats. And it's Linux, Windows and OS X compatible. Wow, I didn't know the game would read portraits that normally reside in the override folder if they're relocated to Portraits. I'll give it a try, as that will bring the contents of my override folder down...maybe below 13,000 items, if I'm lucky For anyone wanting a separate app to convert images, you can't beat GraphicConverter (an easy find on versiontracker.com). - E Link to comment
Steve Posted December 11, 2007 Share Posted December 11, 2007 ...I've found a few different options that work, just a matter of finding the best, which probably means the smallest file size. No sense in delivering a 4 MB file to do the conversion when you're not even going to save that much space by using GIFs instead of BMPs. ... Are you sure this is worth the effort? If you're worried about download size, RAR's arithmetic encoding is probably better than GIF's LZW. If you're worried about disk space, most people are going to dump all of them into the portraits directory as BMPs; those with low disk space are going to add the ones they want and delete everything else. Link to comment
Miloch Posted December 11, 2007 Share Posted December 11, 2007 RAR's arithmetic encoding is probably better than GIF's LZW.Yeah, I would've thought it's better than any sort of file format compression, which makes me wonder why we bother with things like OGG>WAV conversion, tisunpack and so on, but the folks who've been modding for years all do it this way. Of course, that doesn't always mean it's the best way, it just means people have always done it that way. Cam says JPEG conversion helped for LoI's file size though, so I'd think GIF conversion might do the same. Anyway, the only real way to test in this case is for Rabain to RAR his mod with BMPs, then RAR it with GIFs and the gif2bmp tool. It may well be there's no real difference, in which case, I wouldn't bother with the conversion. Here is the tool I found for Windows - download hexgife.zip and then use gif2bmp.exe (or bmp2gif to do the reverse). It's only a few bytes, so if it helps, it's not going to add to the download size. It works without loss (as far as I can tell) - the only drawback is it doesn't take wildcards, so you'd have to specify all the files you want to convert in a batchfile. Link to comment
Steve Posted December 12, 2007 Share Posted December 12, 2007 Using lissaS.gif from a previous post and gif2bmp: lissaS.gif - 3300 bytes lissaS.bmp - 3478 bytes lissaS.jpg - 2243 bytes (90% quality) But if you're talking actual space on disk, you need to know what the smallest disk allocation fragment of your filesystem is. I don't know what NTFS has, but for HFS it's 4096 bytes. So, in reality there's no savings at all. Link to comment
Miloch Posted December 12, 2007 Share Posted December 12, 2007 But if you're talking actual space on disk, you need to know what the smallest disk allocation fragment of your filesystem is.I don't care much about that - the final portraits have to be in .bmp format anyway. And like I said, I wouldn't save any of these as JPEGs, certainly not at 90% which is 10% lossy. The only reason for doing this is to reduce the final mod download size, so also as I said, the only test is to compress a bunch of portraits in both .gif and .bmp format. Link to comment
Kulyok Posted December 12, 2007 Share Posted December 12, 2007 I'm all for reducing download size, but I noticed that the quality goes down after converting and restoring files(a wav file to ogg and back or a .bmp file to .jpg and back). It might be just my impression, but I've witnessed it time and again. With wav files, it's necessary, unfortunately, but with .bmp ones, I think not much space is 'won' in the end. So, I'd keep it in mind. Link to comment
Rabain Posted December 12, 2007 Share Posted December 12, 2007 At the moment the mod folder is 18mb zipped. I could cut that down some (maybe 2mb) by removing all the portraits I currently don't use. Link to comment
Miloch Posted December 12, 2007 Share Posted December 12, 2007 I'm all for reducing download size, but I noticed that the quality goes down after converting and restoring files(a wav file to ogg and back or a .bmp file to .jpg and back).Which is why I recommended .gif instead of .jpg - no loss, unless your portraits are >256 colours (which small portraits should not be). I used the utility on several and compared the GIFs to BMPs - they were all identical. But yeah, it may not save much once RAR gets done compressing things - only testing will tell. Rabain: try compressing as a .rar with "Best" compression. Link to comment
ericp07 Posted December 12, 2007 Share Posted December 12, 2007 You're almost guaranteed to lose some quality when compressing a file, or when converting it from one format to another. This holds true of audio files as well as images. You just have to decide what's acceptable. One could always say "screw the file size" and leave all image files for BGII in .bmp format, and audio files in .wav format...but that's not very forgiving for those of us with an analog modem - E Link to comment
Miloch Posted December 12, 2007 Share Posted December 12, 2007 You don't lose quality with GIFs when the originals are 256 colours. It uses a lossless pixel mapping algorithm, unlike JPG which is not lossless. OGGing WAV files is lossy too - I'm not sure I agree with it, but I'm not going to bog up a graphics thread with talk about audio. Link to comment
Rabain Posted December 22, 2007 Share Posted December 22, 2007 I need some volunteers for installation testing. As there are quite a lot of portraits it takes some time and I got some errors with certain files but have resolved all of them. Now I need to find out if there is anything I've overlooked, so I'm looking for volunteers to install this. Doesn't matter what BG2 setup you have so long as you are playing BG2 with ToB installed. I'm just looking for feedback. Download is currently zipped at 10mb. Please PM me if you would like to test this out and I'll give you the link. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.