
i want to do a screenshot then use irfanview.exe /crop =(x,y,width, heigth) to crop out the minimap.
irfanviews coordinates:
x= left/right. y=up/down
(0:0) is top left corner
(irfanview is some free graphic program http://www.irfanview.com that can be used over commandline)
I use this:
Code: Select all
...
local map_sizeratio = (Game.mapSizeX / Game.mapSizeZ)
gl.ConfigMiniMap(0, 0, 500, 500/map_sizeratio)
...
posX, posY, sizeX, sizeY, minimized, maximized = Spring.GetMiniMapGeometry()
...
so I just added +50 when calling Irfanview.
This used to work:
http://knorke.net23.net/battlereports/n ... _2010x.jpg
http://knorke.net23.net/battlereports/n ... _2010x.jpg
http://knorke.net23.net/battlereports/n ... _2010x.jpg
although I have no idea why.
for example the above code sets the minimap "somewhere"
(with the 0,0 i would expect it to be either at the very top or bottom of the screen, just like it is to the very left)
return of GetMiniMapGeometry arethese values:
posx=0
posy=94 <- wtf 94? counting from where?
width=500
mmh=583
causing this: http://knorke.net23.net/battlereports/n ... _2010x.jpg
Sometimes the 50 pixel offset changes for no reason:
http://knorke.net23.net/battlereports/n ... _2010x.jpg
-> wrong cropping
It is not the way irfanview gets called or my other program that draws the stuff, ive used the "create custom selection" menu and typed in the values by hand and the crop section is still off. even in ms paint you can see the returned values do not match up sometimes.
As far i can tell its only in Y-axis (up/down)
So any hints

more sometimes correct, sometimes wrongly cropped minimaps are here:
http://knorke.net23.net/battlereports/
maybe someone can see a system? I don't.
Oh my windows resolution is 1280x1024 but spring runs in 1024x768. I thought maybe its getting confused by this when i alt tab during loading or whatever but that didnt seem so.