ShadowFlare's Realm
http://sfsrealm.hopto.org/cgi-bin/yabb2/YaBB.pl
ShadowFlare's Realm Forums >> Program Development >> How to get map picture?
http://sfsrealm.hopto.org/cgi-bin/yabb2/YaBB.pl?num=1099830909

Message started by wulfskin on Nov 7th, 2004, 1:35pm

Title: How to get map picture?
Post by wulfskin on Nov 7th, 2004, 1:35pm

Hello everybody,

yes, it's me again ;D! Does anybody know, if it's possible to get the map picture out of the warcraft 3 files? And if it's possible, how does it work?
Has anybody further informations about the mpq-files?

Thanks,
Hans-Peter

Title: Re: How to get map picture?
Post by Nagger on Nov 8th, 2004, 4:00pm

(never did this by myself)

1. extract 'war3mapMap.blp' from map file (using StromLib or Strom.dll - see http://zezula.net/en/mpq/stormlib.html)

2. open this blp-file and filter header (see http://umswe.wc3campaigns.com/specs/insidethew3m.html)

3. decompress jpeg data (using a jpeglib, e.g ijl.dll from warcraft dir)

Title: Re: How to get map picture?
Post by wulfskin on Nov 9th, 2004, 8:09am

Hello Nagger,

thank you very much: it almost works! ;D There is only one serious problem with function SFileOpenFileEx and dynamic library loading. Loading this function static works properly, but when I load it dynamicly, then I also get ERROR_FILE_NOT_FOUND. But I use the same filename 'war3mapMap.blp'.
Is there anything I need to know about dynamic loading and this function? Everything else works fine!

Thanks,
Hape!

Title: Re: How to get map picture?
Post by wulfskin on Nov 9th, 2004, 9:20pm

Hello,

extracting works perfect! ;D I only need to know now how I to use the "ijl15.dll" to decompress the jpeg.
Does anybody know how to use this library?

Thanks,
Hape!

Title: Re: How to get map picture?
Post by wulfskin on Nov 11th, 2004, 9:32pm

Ok,

after some hard research and studying an old help of intel jpeg library I finally got it. If anybody want to have the source in delphi, you can find it here: http://www.delphi-forum.de/viewtopic.php?p=190562#190562.

Now, I only have one last question. Does anyone know how the get a paletted blp, because I think the description on that page is not correct, because the blp file is somehow longer than it has to be and I always get a wrong picture.

Thanks,
Hape!

ShadowFlare's Realm » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.