Code:
#include <File.au3>
#include <Array.au3>
#include <GDIPlus.au3>
_GDIPlus_Startup()
$input = "****\hongkong\map\" ;Pfad zu downgeloadeten map ordner
$x = 2850 ;bild göße x
$y = 3650 ;bild göße y
$c = 5 ;wert zu skaliren
$map_names = _FileListToArray($input, "*", 2)
Dim $settings, $map[$map_names[0]][5]
$Form1 = GUICreate("World-Map", 10, 10, 0, 0)
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form1)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($x, $y, $hGraphic)
$hGraphicBuff = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$hPen = _GDIPlus_PenCreate(0xFFFFFFFF, 2)
$hBrush = _GDIPlus_BrushCreateSolid(0xFFC0C0FF)
$hBrush2 = _GDIPlus_BrushCreateSolid(0xFF000000)
$hFormat = _GDIPlus_StringFormatCreate()
$hFamily = _GDIPlus_FontFamilyCreate("Arial")
$hFont = _GDIPlus_FontCreate($hFamily, 20)
For $i = 1 To $map_names[0]
If Not FileExists($input & $map_names[$i] & "\Setting.txt") Then
MsgBox(0,"","Der Pfad zum Map ordner ist flasch")
Exit;
EndIf
$settings = FileRead($input & $map_names[$i] & "\Setting.txt")
$tmp = StringSplit($settings, "BasePosition ", 1)
$cords = StringSplit($tmp[2], " ")
_ArrayDelete($cords, 0)
$tmp = StringSplit($cords[1], Chr(10))
$cords[0] = $cords[0] / 100 / $c
$cords[1] = $tmp[1] / 100 / $c
Do
_ArrayPop($cords)
Until UBound($cords) = 2
$tmp = StringSplit($settings, "MapSize ", 1)
$cords2 = StringSplit($tmp[2], " ")
$tmp = StringSplit($cords2[1], Chr(10))
_ArrayAdd($cords, $cords2[1] * 256 / $c)
_ArrayAdd($cords, $tmp[1] * 256 / $c)
$map[$i - 1][0] = $map_names[$i]
$map[$i - 1][1] = $cords[0]
$map[$i - 1][2] = $cords[1]
$map[$i - 1][3] = $cords[2]
$map[$i - 1][4] = $cords[3]
_GDIPlus_GraphicsDrawRect($hGraphicBuff, $cords[0], $cords[1], $cords[2], $cords[3], $hPen)
_GDIPlus_GraphicsFillRect($hGraphicBuff, $cords[0] + 1, $cords[1] + 1, $cords[2] - 2, $cords[3] - 2, $hBrush)
$tLayout = _GDIPlus_RectFCreate($cords[0] + 2, $cords[1] + 2, $cords[2] - 4, $cords[3] - 4)
$aInfo = _GDIPlus_GraphicsMeasureString($hGraphicBuff, StringReplace($map_names[$i],"metin2_map_",""), $hFont, $tLayout, $hFormat)
_GDIPlus_GraphicsDrawStringEx($hGraphicBuff, StringReplace($map_names[$i],"metin2_map_",""), $hFont, $aInfo[0], $hFormat, $hBrush2)
Next
;_ArrayDisplay($map) ; map info mit allen cords
_GDIPlus_ImageSaveToFile($hBitmap, @DesktopDir & "\world-map.bmp")
_GDIPlus_Shutdown()