God I'm so confused - Printing boards from VASL....

Martin Mayers

Elder Member
Joined
Jul 29, 2008
Messages
4,154
Reaction score
1,166
Location
The Gulag
First name
Gulagwanker
Country
llRussia
I know there are other threads on this subject but they aren't making any sense.

I think the question I mean to ask is what size zoom the VASL board needs to be at, prior to being saved as a PNG file, to match a standard ASL hex size?

Thanks in advance. If anyone had any REALLY straightforward instructions for doing this they'd instantly reach God status in my life. Something so probably simple, causing me such insanity :)
 

Honza

The Art Of Wargames
Silver Supporting Member
Joined
Dec 30, 2005
Messages
12,290
Reaction score
1,114
Location
Oxfordshire
Country
llCzechia
Printers can usually adjust the size of the print to suit your purposes. So maybe it does not matter too much.
 

xenovin

Elder Member
Silver Supporting Member
Joined
Aug 7, 2010
Messages
1,883
Reaction score
973
Location
Skynet
First name
Vincent
Country
llUnited States
I know there are other threads on this subject but they aren't making any sense.

I think the question I mean to ask is what size zoom the VASL board needs to be at, prior to being saved as a PNG file, to match a standard ASL hex size?

Thanks in advance. If anyone had any REALLY straightforward instructions for doing this they'd instantly reach God status in my life. Something so probably simple, causing me such insanity :)
Usually I extract out the full gif file from the VASL file (unless you want overlays and season/weather conversions included) but printers want to add a 1/8-inch margin around any print job so you need to turn that off and play with the print percentages if you want to print something that matches up with SK geoboards. It takes a while to get it right but once you do, write it down as that will work for your specific printer. No silver bullet just trail and error (sounds like a scenario title).
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,319
Reaction score
5,403
Location
Teutoburger Wald
Country
llIceland
I know there are other threads on this subject but they aren't making any sense.

I think the question I mean to ask is what size zoom the VASL board needs to be at, prior to being saved as a PNG file, to match a standard ASL hex size?

Thanks in advance. If anyone had any REALLY straightforward instructions for doing this they'd instantly reach God status in my life. Something so probably simple, causing me such insanity :)
There are a number of issues that you face. First, vasl adds a white border around the map when it exports it. The white border seems to be about 0.153 or so of the image length on each edge. Raster image files (png is a raster image format) are nothing but grids of dots. There's really nothing inherent in a grid of dots that says how big it will print. If each dot in the image were to print as one dot on the printer (i.e. the "obvious" way, at whatever the smallest resolution the printer was capable of), the same image would print at different sizes on different printers when the printers had different resolution capabilities.

Many image file types, including .png, have additional information stored inside the file that says what size & resolution the image thinks it is. If you load the in gimp (gnu image manipulation program) you will find that vasl creates the png files as 300dpi x 300dpi (dpi = dots per inch) (to view choose Image, Image Properties in the top bar). The lowest default zoom saves the image as 514 x 285 pixels. The highest default zoom saves the image as 3900 x 2168 pixels, which at 300 dpi is 13 inches wide. That includes the white border. The map part will be smaller. This is smaller than true map size, slightly over half size.

The border really complicates things, and I have not dived into the code to figure out what the true ratio is. By some calculation and some tests I estimate it is slightly greater than 370%.

Once you have generated your image you have to watch out for whatever software you are using and your printer driver trying to "help" by scaling down (or sometimes up) the image to fit on the page.

JR
 

Tycho

Member
Joined
Sep 9, 2004
Messages
278
Reaction score
21
Location
The Dalles, OR
Country
llUnited States
I usually bring the PNG file into paint.net (~$6 on the Windows app store, free (search on "paint net software") over the 'net) and crop it there before printing. Other than that, yeah, lots of trial and error.
 

Martin Mayers

Elder Member
Joined
Jul 29, 2008
Messages
4,154
Reaction score
1,166
Location
The Gulag
First name
Gulagwanker
Country
llRussia
I may have sussed it by way of the oft mentioned "trial and error" resolution lol

Who'd have thought, in 2018, that this could be so fucking hard.
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,319
Reaction score
5,403
Location
Teutoburger Wald
Country
llIceland
I may have sussed it by way of the oft mentioned "trial and error" resolution lol

Who'd have thought, in 2018, that this could be so fucking hard.
Ultimately you are using the wrong tool. The right tools probably would include some unzip program, gimp & posterazor (or other program to split the image). If you are just printing a raw map, I would extract the .gif file from the board .zip rather than exporting from vasl. If you are printing a vasl-modified map, then export it from vasl. I would probably try export at 100% first, but you want to get the map part to be the same as the .gif so there's no scaling performed by java. Load the .gif into gimp. If you have exported it from vasl, crop off the white border, then scale the image to the right size. gimp will scale the image to a given size; choose eight inches wide. If you have a printer that will take the full-size image, then print it from gimp. If you don't, export from gimp as a file type that posterazor likes (png would probably work; it's been a while since I have used posterazor) then use posterazor to cut the image up into page-sized chunks.

If you do this a lot, you could probably automate most, and perhaps all, of the procedure with imagemagick.

If you know some tools it's not hard. I wouldn't expect it to take more than five minutes as long as I didn't export from vasl. The border complicates things because you have to know what size border vasl creates.

JR
 

Martin Mayers

Elder Member
Joined
Jul 29, 2008
Messages
4,154
Reaction score
1,166
Location
The Gulag
First name
Gulagwanker
Country
llRussia
Ultimately you are using the wrong tool. The right tools probably would include some unzip program, gimp & posterazor (or other program to split the image). If you are just printing a raw map, I would extract the .gif file from the board .zip rather than exporting from vasl. If you are printing a vasl-modified map, then export it from vasl. I would probably try export at 100% first, but you want to get the map part to be the same as the .gif so there's no scaling performed by java. Load the .gif into gimp. If you have exported it from vasl, crop off the white border, then scale the image to the right size. gimp will scale the image to a given size; choose eight inches wide. If you have a printer that will take the full-size image, then print it from gimp. If you don't, export from gimp as a file type that posterazor likes (png would probably work; it's been a while since I have used posterazor) then use posterazor to cut the image up into page-sized chunks.

If you do this a lot, you could probably automate most, and perhaps all, of the procedure with imagemagick.

If you know some tools it's not hard. I wouldn't expect it to take more than five minutes as long as I didn't export from vasl. The border complicates things because you have to know what size border vasl creates.

JR
I couldn't read beyond your first couple of lines mate. I would have had more understanding had it been written in Japanese, Arabic, or Klingon.

:)
 

witchbottles

Forum Guru
Joined
Feb 26, 2010
Messages
8,970
Reaction score
2,040
Location
Rio Vista, CA
Country
llUnited States
I couldn't read beyond your first couple of lines mate. I would have had more understanding had it been written in Japanese, Arabic, or Klingon.

:)
GimP is freeware, easy to install, and is an all around good tool to learn if you prefer doing graphics work for print, for just about any reason, including ASL.
 

Paul M. Weir

Forum Guru
Staff member
Moderator
Joined
Apr 3, 2004
Messages
8,399
Reaction score
3,382
Location
Dublin
First name
Paul
Country
llIreland
A Zip file is like a directory on your disk. Though it is a single file that can be emailed, copied, etc as one file it has an internal structure that allows many other files to be extracted. Think of it as a ziplock bag. Many Zip files have a ".zip" extension/file type, but not all. The board files in VASL have no file type but are still Zipped. You might see a file called "bdXYZ" for a XYZ module.

Without a utility like 7zip (see below) then rename the file to "bdXYZ.zip". Windows will now allow you to extract the contents.

I use a free utility called 7zip for opening zipped files. The home page is https://www.7-zip.org/ and the latest versions can be downloaded here: https://www.7-zip.org/download.html. Just download the appropriate (Windows, 32 or 64 bit, etc) version. Then run the downloaded file (eg 7z1805-x64.exe). I've used versions of 7zip for over a decade, I would not be without it.

With 7zip you can right click on the file and you will see a 7zip line in the pop-up menu. If you follow the 7zip line you will see a submenu with lines like "open archive". The "open archive" will open a window showing the contents of the Zipped file. You can then drag and drop any or all of the contents into where ever you want. You do not have to rename the Zipped file, 7zip will treat any file as a potential Zip file and try to make sense of it as a Zip file. It will either display the contents in a window or give you an error message if it's internal data don't make sense as a Zip file, no harm done though.

You would be surprised how many files are Zip or Zip like in disguise. Many download and install files (.EXE) are really self extracting Zip programs. Just now I downloaded the v18 of 7zip to upgrade my v17 and afterwards out of curiosity right clicked on the v18 install program (7z1805-x64.exe) and by 7zip->Open archive was able to see the contents of the installation.

Though I don't use VASL, I have examined the contents of a few VASL files. Within the VASL download file you can see further files without a file type (IE no .exe, .gif extension). Extract those files using 7zip into a work folder and using 7zip you can then check to see if those extracted files are themselves Zip files containing files like .gif picture files. Potentially you could have many layers of Zip files embedded within other Zip files.
 

Martin Mayers

Elder Member
Joined
Jul 29, 2008
Messages
4,154
Reaction score
1,166
Location
The Gulag
First name
Gulagwanker
Country
llRussia
Thanks for all your help. I think I have worked my shit out. But I will have a look at some of the other solutions to mine, especially that Gimp programme.
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,319
Reaction score
5,403
Location
Teutoburger Wald
Country
llIceland
As far as I can see when you create the .png in vasl at 100%, the original map gets printed out the same as it came in. In general I like to have as few pieces of software interpolating images as possible. If you export from vasl at, say, 150% then use gimp (or similar) to scale it to a final size, you are using two programs to scale, which is something I don't think you should do. I would suggest exporting to png at 100% zoom, then trim the border in gimp and use gimp again to scale to the final dimensions.

I looked through the code but I couldn't find where the border is added. I think the width is a fixed 400 pixels on each edge at 100%. If correct that would make automating the trim a snap in imagemagick. I am going to guess that the scaling could be done in imagemagick too.

JR
 

Horrido

Member
Joined
Oct 2, 2008
Messages
38
Reaction score
22
Location
Saint Michael, MN
Country
llUnited States
Thought I'd throw my 2 cents in as I do this sort of thing often. The first thing I'd do is unzip the vasl module and see if the original board images are there. If you are not aware, you can just change the extension on a vasl module from *.vsl to *.zip. Like jrv says, it's important to only resize one time to avoid distortion. Better software will give you better resize quality, so use GIMP at a minimum. Black Friday right around the corner - maybe you can get a copy of paintshop pro for $20 Might sound like a lot, but you'll be using it in 20 years.

I doubt anyone is going to give you the resize number you ask for, as it is printer dependent (even if you get the dpi right). Just iterate in by printing a hex, measure with a caliper, and adjusting.
 
Last edited:

Martin Mayers

Elder Member
Joined
Jul 29, 2008
Messages
4,154
Reaction score
1,166
Location
The Gulag
First name
Gulagwanker
Country
llRussia
Thought I'd throw my 2 cents in as I do this sort of thing often. The first thing I'd do is unzip the vasl module and see if the original board images are there. If you are not aware, you can just change the extension on a vasl module from *.vsl to *.zip. Like jrv says, it's important to only resize one time to avoid distortion. Better software will give you better resize quality, so use GIMP at a minimum. Black Friday right around the corner - maybe you can get a copy of paintshop pro for $20 Might sound like a lot, but you'll be using it in 20 years.

I doubt anyone is going to give you the resize number you ask for, as it is printer dependent (even if you get the dpi right). Just iterate in by printing a hex, measure with a caliper, and adjusting.
I've managed. Certainly enough to get my tournament in play next week. If anyone complains about distortion (or anything) I will actually kill them and force the rest of the tournament entries to eat them in a pie.

Your post (and others) illuminated just how backwards I am when it comes to IT, and how much people who are savvy with IT presume it impossible for people to exist who are as backward with IT as I.

For example...."unzip the VASL module". Meaningless. Assuming you don't play drums I could only explain it by handing you a snare drum and saying "tune it to the 9th" :) :) :)

Again though, thanks for your efforts mate and everyone else on here who stepped forward to help.
 

Andy Bagley

Recruit
Joined
May 28, 2018
Messages
12
Reaction score
4
Location
Leeds, UK
First name
Andy
Country
ll
If you're able to share whatever secret you've discovered when we meet in Blackpool I'll be eternally grateful. You can then move on to figuring out the meaning of life!
 

Martin Mayers

Elder Member
Joined
Jul 29, 2008
Messages
4,154
Reaction score
1,166
Location
The Gulag
First name
Gulagwanker
Country
llRussia
If you're able to share whatever secret you've discovered when we meet in Blackpool I'll be eternally grateful. You can then move on to figuring out the meaning of life!
My entire strategy thus far has been the age old mechanic's strategy of "arse around until it works".
 
Top