• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Import] Does anyone know how to extract a minimap?

Status
Not open for further replies.
Level 6
Joined
Jan 4, 2014
Messages
227
DLL stands for Dynamic Link Library, which countains functions, and one of those functions can convert a map(w3x) to a picture(jpg).
To use a function from inside a DLL, you need a programming language like C++ or C#.
i suggest you ask the creator of this tool Directly, i'm sure he will give a solution, or ask him to make a program that extract minimap image from maps.
Good luck :)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
The thing is that this site automatically generates a mini-map when you upload a map.
No it does not. It uses the mini-map stored inside the map archive.

How do they do it?
1. Extract mini map image from map archive. This is easy since it is always at the same path.
2. Convert mini-map image into a usable format. I forget if it is blp (non-standard) or tga (standard). For the internet you will almost always want JPEG with some compression to save bandwidth.

You can automate the process using various means. Some form of command line package could allow you to extract and convert the images from the command line which can then be done in batches or in response to commands etc. You could also write a dedicated program which uses an MPQ library (like that used by MPQEDIT) to extract the file and then appropriate image processing libraries to convert it.

I believe THW is run on a Linux server. As such I would imagine some command line approach is used in response to map archive uploads that also generates the map submission entry.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
are you suggesting they had this mini-map already in their archive before I even created the map??
No, but the map has it in its archive the instant you add it. Like WC3, they read the archive to get the mini-map image.

WC3 maps are MPQ archives. Just like SC2 maps (although SC2 uses a more modern version of MPQ).
so, how does one export it via the command line?
Using some form of MPQ tool. For GUI based exportation you can use MPQEDIT. However for command line you will need some wrapper of a MPQ library (I think someone linked above).
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
This site runs on a Linux server I believe. I recommend asking Ralle or someone for the exact details of the implementation they use however I doubt it is anything more complex than using some standard set of tools and attaching it to various pieces of functionality.
 
Status
Not open for further replies.
Top