Warcraft II Forum

Warcraft II => Mods & Development => Topic started by: Lambchops on May 27, 2018, 01:47:56 AM

Title: Handy PUD bitmap maker.
Post by: Lambchops on May 27, 2018, 01:47:56 AM
Looks like mostly my SS grabber is only being used to make pics of maps - not really in game SS, so this is probably much easier to use.

TuPaC asked for this so I just did a very quick and nasty hack of my pud editor project and made it a console app.

Just unzip then drop a .pud file onto pudpic.exe and it will make a .bmp file, without having to use war2 at all.

128x128 full map bitmaps are over 16MB so you will probably want to convert to png or jpg or whatever.

There's no error checking - if you give it a rubbish file it will just crash.


UPDATED 9/2018

Will now resize &/or save to jpeg format (see below (http://forum.war2.ru/index.php/topic,4126.msg71205.html#msg71205)).
Title: Re: Handy PUD bitmap maker.
Post by: Delete mine too on May 27, 2018, 02:19:45 AM
Looks like mostly my SS grabber is only being used to make pics of maps - not really in game SS, so this is probably much easier to use.

TuPaC asked for this so I just did a very quick and nasty hack of my pud editor project and made it a console app.

Just unzip then drop a .pud file onto pudpic.exe and it will make a .bmp file, without having to use war2 at all.

128x128 full map bitmaps are over 16MB so you will probably want to convert to png or jpg or whatever.

There's no error checking - if you give it a rubbish file it will just crash.



Thanks works perfect!

make a batch file

cd C:\War2Combat\maps\
for /r %%i in (*.pud) do pudpic.exe "%%i"
pause

edit your war2 maps directory above put the files(pudpic files, bat.file) into the same directory the root map folder is. Now it will convert all your maps to an image! :)



Edit: Adding those map pictures to my game info list. Would look cool if @iL added that to the anti hack status page....

(https://preview.ibb.co/jHwGVo/MntnPass.png) (https://ibb.co/cpPQO8)
(https://preview.ibb.co/mYp3Ao/Passes.png) (https://ibb.co/k8wTbT)
(https://preview.ibb.co/mbUQO8/Raiders.png) (https://ibb.co/d9xZGT)
(https://preview.ibb.co/gasC38/RockMaze.png) (https://ibb.co/hFBiAo)
(https://preview.ibb.co/huRpi8/Shared.png) (https://ibb.co/igjaO8)
(https://preview.ibb.co/n6E9i8/Tourney.png) (https://ibb.co/kZeaO8)
(https://preview.ibb.co/b6Wpi8/TwinHrbr.png) (https://ibb.co/nQWYAo)
(https://preview.ibb.co/mY8238/Up4Grabs.png) (https://ibb.co/k0XUi8)
Title: Re: Handy PUD bitmap maker.
Post by: iL on May 28, 2018, 06:39:49 AM
Would look cool if @iL added that to the anti hack status page....
Hm, would be very interesting to get that pubpic for UNIX!

To make it possible to build that as ./pudpic file.pud file.bmp (or png).
Then we will be able to make something like maps gallery, similar to ss.war2.ru.
@Lambchops, what do you think about that?

Also, my desire: an option to write amount of gold/oil on mine/patch.
Gold mine with number 60000 or w/e would be very useful as for me.
Title: Re: Handy PUD bitmap maker.
Post by: Lambchops on May 30, 2018, 01:33:43 AM
Would look cool if @iL added that to the anti hack status page....
Hm, would be very interesting to get that pubpic for UNIX!

To make it possible to build that as ./pudpic file.pud file.bmp (or png).
Then we will be able to make something like maps gallery, similar to ss.war2.ru.
@Lambchops, what do you think about that?

Also, my desire: an option to write amount of gold/oil on mine/patch.
Gold mine with number 60000 or w/e would be very useful as for me.

Yeah I would like to add some more features like that, should be pretty easy, it's on my to-do list.

Re-building it for UNIX is possible, although there's some Windows specific API functions used in both the exe (C++) and the DLL's (ASM) so they would have to be re-written to use their UNIX counterparts.
Title: Re: Handy PUD bitmap maker.
Post by: shesycompany on September 15, 2018, 10:37:47 PM
i really love you lamb
Title: Re: Handy PUD bitmap maker.
Post by: shesycompany on September 15, 2018, 10:39:59 PM
Final Fantasy VII - Those Chosen by the Planet [HQ] - YouTube (http://www.youtube.com/watch?v=3rV40ypje7o#)
Title: Re: Handy PUD bitmap maker.
Post by: shesycompany on September 15, 2018, 10:42:35 PM
Final Fantasy VII - You Can Hear the Cry of the Planet [HQ] - YouTube (http://www.youtube.com/watch?v=CBRAkpXTmCs#)
Title: Re: Handy PUD bitmap maker.
Post by: shesycompany on September 15, 2018, 10:46:14 PM
Final Fantasy VII - Aerith's Theme [HQ] - YouTube (http://www.youtube.com/watch?v=fIqKWLkm2-g#)
Title: Re: Handy PUD bitmap maker.
Post by: shesycompany on September 15, 2018, 11:02:07 PM
i am a spirioth clone
Title: Re: Handy PUD bitmap maker.
Post by: shesycompany on September 15, 2018, 11:08:14 PM
Final Fantasy VII Advent Children - One Winged Angel (Music) - YouTube (http://www.youtube.com/watch?v=B_MW65XxS7s#)
Title: Re: Handy PUD bitmap maker.
Post by: Lambchops on September 16, 2018, 04:39:35 AM
OK I have finally done a little bit more on PUDPIC.

You can get the new version HERE (http://forum.war2.ru/index.php?action=dlattach;topic=4126.0;attach=2576).


I wrote an ASM image resize/blend procedure so it can produce a pic of the size you want. Also has a jpeg save option.

i.e.

    PUDPIC /s:500  MyMap.pud

will make a 500x500 32 bit blended bitmap

Without the /s switch it will default to producing a full size 8bit bitmap with the original game palette (the current behavior).

   PUDPIC /j:80 ThisMap.pud

will save the full size 8 bit image as a quality 80 jpeg

   PUDPIC /s:1024 /j:90 Maposaurus.pud

will resize to 1024x1024 and save as quality 90 .jpg file

 ^- THESE SETTINGS SEEM TO BE PRETTY GOOD FOR A GENERAL PURPOSE POST ON FORUM/DISCORD ETC IMAGE
( give you around a 300KB file that looks ok if you dont zoom in too close)




... also if you want you can just rename the exe file to include the size/quality.

i.e.  if you rename it to "PUDPICs500.exe" it will automatically make a 500x500 bitmap any time you drop a file on it.

or if you rename it to "PUDPICs1024j90.exe" it will automatically make a 1024x1024 quality 90 jpeg any time you drop a file on it.

You can even have multiple copies of the exe file with different sizes you use and just drop your pud file on the one you want.

Like this:

(http://forum.war2.ru/index.php?action=dlattach;topic=4126.0;attach=2577)


I *think* the command line switches will work in a UNICODE environment - but please let me know if you have any problems.

Have fun  :critter:


Title: Re: Handy PUD bitmap maker.
Post by: Lambchops on September 16, 2018, 04:47:07 AM
(http://forum.war2.ru/index.php?action=dlattach;topic=4126.0;attach=2579)



Here's gow resized to 1024x1024 jpg qual 90

Seems ok for a 267KB file.

Of course you can play with the settings and make anything from a full sized pixel perfect bitmap to a thumbnail if you want.



-- EDIT --

   .....  and OMG lmao at those default hall spots ;D even after 20 years they still make me go WTH?

Title: Re: Handy PUD bitmap maker.
Post by: chayliss on January 22, 2024, 10:38:42 AM
i want this utility but it keeps telling me some kinda network error =[
oh the later post with new verison worked, why not modify OP with new link/vers to help solve confusion. this is common not just this thead.

Looks like mostly my SS grabber is only being used to make pics of maps - not really in game SS, so this is probably much easier to use.

TuPaC asked for this so I just did a very quick and nasty hack of my pud editor project and made it a console app.

Just unzip then drop a .pud file onto pudpic.exe and it will make a .bmp file, without having to use war2 at all.

128x128 full map bitmaps are over 16MB so you will probably want to convert to png or jpg or whatever.

There's no error checking - if you give it a rubbish file it will just crash.


UPDATED 9/2018

Will now resize &/or save to jpeg format (see below ([url]http://forum.war2.ru/index.php/topic,4126.msg71205.html#msg71205[/url])).


Title: Re: PUDPIC Handy PUD bmp or jpg maker!!!
Post by: DANILIN on March 14, 2024, 06:33:33 AM
Каталоги файлов PUD лучше дополнять файлами pudpic
& bat с десятками строк вида
PUDPICs720j88 12345.PUD

где список файлов PUD создаётся автоматически
подсветив файлы каталога и нажав шифт и скопировав путь
и далее вставить в блокнот и заменив пути слева на PUDPICs720j88

Результат: все файлы PUD дополнены эскизами карт JPG
и оформляется за минуту начиная с копии файлов в каталог PUD
и сразу видны пустые карты

Настройка PUDPICs720j88 взята из моих файлов 2019 года
почти 5-летней давности




PUD file better directories should be supplemented with pudpic files
& bat with dozens of lines like
PUDPICs720j88 12345.PUD

where list of PUD files is created automatically
by highlighting directory files and pressing shift and copying path
and then paste it into notepad and replace paths left on PUDPICs720j88

Result: all PUD files are supplemented with JPG map thumbnails
and is completed in a minute starting with a copy of files in PUD directory
and empty cards are immediately visible

PUDPICs720j88 setup taken from my 2019 files
almost 5 years ago




Katalogi faylov PUD luchsche dopolnyat' faylami pudpic
& bat s desyatkami strok vida
PUDPICs720j88 12345.PUD

gde spisok faylov PUD sozdayotsya avtomaticheski
podsvetiv fayly kataloga i nazhav shift i skopirovav put'
i daleye vstavit' v bloknot i zameniv puti sleva na PUDPICs720j88

Rezul'tat: vse fayly PUD dopolneny eskizami kart JPG
i oformlyayetsya za minutu nachinaya s kopii faylov v katalog PUD
i srazu vidny pustyye karty

Nastroyka PUDPICs720j88 vzyata iz moikh faylov 2019 goda
pochti 5-letney davnosti