PDA

View Full Version : Map Zooming Issue



Answulf
January 12th, 2010, 07:52
It's been a while since I've used FG, and I must be missing something about importing maps.

I load up a .jpg battlemap and it is zoomed in and cropped, although I can drag down and see the rest of the image and with much ctrl and mousewheel monkeying I can get it to look OK. I save the file as a .png and open it and it's perfect - loaded to scale. Then I go back and save it again as a .gif and the .png and .jpg suddenly both load to scale perfect, but the .gif is zoomed in. What am I missing here?

Sigurd
January 12th, 2010, 13:58
I think FG deals with pictures as files not projects. If you load a xxxx.png or xxxx.gif the program has no way of knowing if they are the same picture.

Personally I work mostly in pngs it seems to be the best format.

drahkar
January 12th, 2010, 14:27
Generally .png works best as its the cleanest and has the least issues with things like transparencies.

Answulf
January 12th, 2010, 15:24
Thanks guys, I guess I'll just start working in .png files only - but that still doesn't explain why other image files wouldn't load to scale? Is it a known bug with FG2, or am I doing something wrong that I don't know about?

It's been well over a year, but I played FG a bit in the past and don't remember having these zoom/scaling issues when I loaded up images.

Answulf
January 12th, 2010, 15:50
Did more testing and it has nothing to do with file type.

This is the problem/solution again and when I deleted the campaignregistry.lua file, everything was fine. What I don't get is that the maps were square images (700x700) which I thought would prevent this, so I don't know how they got jacked up in the first place.


FG won't display empty space on the sides or top/bottom of an image window, so it zooms the image to fill the window along the narrow axis and then crops it along the wide axis.

You can resize the window to adjust the aspect ratio and/or size, but it unhelpfully 'remembers' the size of the last image loaded with that database reference: if you delete an image (because your campaign has moved on from one adventure) and then add an image (because the players have moved into a new area) FG re-uses the database reference and you get stuck with the old image size.

To prevent the 'remembering' you can either edit the ruleset to disable this feature (see below) or you can delete your campaignregistry.lua file.

Preventing the window size from being remembered in code, is relatively easy if you have an editable ruleset. The file scripts/windowmanager.lua needs to have the contents of the onInit function commented out as follows:


function onInit()
-- Interface.onWindowOpened = onWindowOpened;
-- Interface.onWindowClosed = onWindowClosed;
end

Hope that helps

Foen