Scaling Imported Images

One reason to import an image into your map is to use it as a guideline for your mapping. For example, maybe you want to import that scan of your old hand-drawn map, or importing a real world city map to re-map it in CC3+. Inserting the image is easy enough (Insert File from the Draw menu), but one of the important things when you want to use an image for reference (or using it as part of the final drawing) is to get it to scale. You could wing it, but that often comes back to bite you later, as a lot of the default sizes for effects, line widths and so on assume your map is to scale. I’ve talked about the importance of scale in an earlier article, but for this one, I’ll just focusing on scaling imported images.

If you want to see a video demonstration of this, I did some scaling as part of my livestream on Modern Blueprints.

The main problem when inserting a file is that it basically will never be to scale. CC3+ doesn’t measure things in pixels, while that is really all that an image cares about. As a result, when inserting an image into CC3+ there isn’t really anything like a 100% scale, true size, or whatever, those things simply doesn’t make sense in that context. Instead, when you insert an image into CC3+, you can make it whatever size you wish.

How to Insert an Image

Inserting an image into your map is really easy, but it helps if you set up things first. First of all, if this is a temporary image you intend to use as a guideline, it makes things easier if it is set up a sheet for it first, and optionally a layer. This allows you to easily hide the image when you are done, as well as easily move it up/down in the sheet order to position it correctly when using it as a guide. So, my recommendation here is to make a new sheet called BITMAP, as well as a layer with the same name. Then set this sheet and layer as the active sheet and layer, which the image will then be inserted on.

The second consideration is where the image is located in your file system. CC3+ doesn’t embed the actual image file in the drawing, but just references the original file, so it needs to be available to CC3+ at any time you open your map. CC3+ can use either absolute or relative paths to your image. The great thing about using relative paths is that even if you move things around, CC3+ can still find your image, while if you use an absolute path, you may find the image getting broken and displaying a red X if you move the file around. So, my advice is to put the image in the same folder your map file (.fcw) is located, and if you ever move the map file to a different folder, just remember to move the image at the same time. When the image is located in the same folder as the map file, we can use a map-relative path, meaning CC3+ always expect the image to be in the same location, relative to your map.

Now, use Draw -> Insert File and find the file you want to insert. Before clicking OK however, click the button labeled Bitmap Options and make sure Hide Picture Outline is enabled, and most importantly of all, that you set Make Path to relative to current drawing. (This option only works if you followed my advice on putting the image in the same folder as the map file. If you don’t do this, then absolute path is the correct option).

Once you click OK, you place the image by clicking two points inside the map which defines two opposite corners of the image. After placing the first point, you’ll see a preview of the image as you move your mouse, so you can see how it will look.

Getting it Correct out of the Box

If you know the exact size your image covers, you can use this option. However, this require you to know the exact size of the area the image covers in feet, meters, miles or kilometers, depending on the scale of your CC3+ map, and not just the pixel dimensions of the image. And with exact size, I mean exact, and that also includes the area of the image occupied by a map border or similar. If you don’t have this information, you’ll probably just want to go for the next section below instead, or if you have approximate values, you can start using this technique first and get an approximate fit first, before using the next section to tweak it to make it perfect.

So, for this example, let me assume I am working with an overland map, and that my image represent a 125 by 100 mile area exactly. The number of pixels in the file is of no concern, we are only interested in the real world area it covers. So, I use the procedure from above to insert my image, but when asked for the first corner, instead of just clicking an appropriate spot in the map, I manually type in 0,0 on the command line and hit enter. This leads to the first corner being at the origin of the map, which for nearly all templates is the bottom left corner of the map, immediately inside the graphical map border (exactly at the edge of it to be precise.) Now, again, instead of moving our mouse and place the second corner by eye, we are again going to type in on the command line, this time we type @125,100 and hit enter.The @-sign here says that we are now providing relative coordinates, as in relative to our previous corner. And 125,100 means it should be 125 miles horizontally and 100 miles vertically from this point. Note that since our initial coordinates were 0,0, we could strictly speaking have been dropping the @-sign here and just types in 125,100, but using relative coordinates is great if we didn’t know where our first corner was placed, for example if we had placed it by just clicking in the map instead of typing 0,0. This way, we can ensure correct sizing no matter where it was placed in the map. You can read more about coordinates and precision work in the Precision Tools in Campaign Cartographer article.

Voila, our image have been inserted at a size of exactly 125 by 100 miles. If the image happened to represent exactly this area, we are now done, but if the image also had for example a pretty border around the actual map area or anything like that, we may find it is not completely accurate yet, so we need some tweaking.

Resizing the Inserted Image

To figure out if our inserted image is correctly scales, we can use the Distance command from the Info menu. This command allow you to click two points, and CC3+ tells you the distance between them. There are actually two versions of this command, depending on which add-on is currently active, one of the version will present you with a simple dialog box that shows just the distance, while the second version also shows information about bearing  and orthogonal distances. For this version of the dialog, the actual distance number is the second number in the top text field. If you have a scale bar in your image, using the Distance command to simply measure the length of this scale bar is the best option. If CC3+ gives you a different value than the length of the scale bar, then the inserted image needs to be resized. Since you can’t use precision tools on pixels in an image, do expect a small discrepancy between the actual result and the measured result, for example if the scale bar is supposed to be 100 miles, and your measurement says 99.9853 miles, you can probably just accept that as correct scale due to the imprecise nature of clicking at the points by eye. You may even wish to measure a couple of times, and just take the average of your measurements if you  really need to be precise. Note that when measuring a straight entity like a scale bar, it can be advantageous to keep Ortho on, as this ensures you don’t accidentally measure at an angle, as this will be slightly longer than the straight path.

If you don’t have a scale bar, you can also measure between any two points in your image that you know the distance. Can be from city to city, coast to coast or whatever. The only important thing is that you know the actual distance between these points, you can’t scale it if you don’t know how big it should be. These measurements tends to end up being less precise than a scale bar, but they are better than nothing, and can still help you get thing reasonably correct.

For my example here, I’ve measured the 30 mile scale bar in the image, and CC3+ tells me it is 76.73547 miles. Clearly too big, so we need to scale it down a bit.

The formula for scaling it down is easy, it is simply scaling the image by actual size divided by measured size, which is 30/76.73547 which equals 0.39095.

To do the actual scaling, right click the Scale button and pick the Non-visual scale option. Non-visual scale only allows scaling by typing coordinates, and doesn’t show a preview when you move your mouse, which makes it perfect for precision work. Of course, this makes it even more important to keep an eye on our command line to see what CC3+ wants from us. The first prompt is to select entities, so start by selecting the image and Do It as usual. Next question is the scale factor. This is the value we calculated previously, 0.39095 in my example here, so just type that value and hit enter. But note CC3+ is quite smart here, so instead of manually calculating it beforehand, we could instead just type in 30/76.73547 on the prompt instead, and CC3+ would just calculate and use the value, this is what I would normally do. The last prompt is for the scale center. The scale center is basically the point of the image that will stay exactly where it is, while the rest of the image will shift to account for the changed size. If the bottom left corner of the image is supposed to stay down in the bottom left corner of the map where we placed it, you can type in 0,0 for the scale center and hit enter.

Now, the image should be scaled to the new size, quite a bit smaller in my example here, but if the image was to small to begin with, it might of course be bigger instead. The next step is to use the Distance tool again to measure that the distance looks right. As mentioned above, because you are clicking by eye when measuring in the image, don’t expect 100% accuracy, but you should be pretty close. Also note that it is useful to zoom in close to whatever you are measuring to be able to click as precise as possible.

Now, in my case, I get a measurement of 29.93084. If I am happy with this, then all done, the image is now to scale, and I can start using it for whatever I want, for example to use as a guide image to draw on top with my drawing tools (Remember to move the sheet back in the sheet order, so what you draw with your tools get placed on top of the image and not below). However, if you are not quite pleased, you can basically redo this section, and scale the image again using the new numbers. Because of rounding errors and the difficulty of clicking exactly, doing this iteratively by repeating the procedure will get you closer for each iteration, since rounding errors will have much less impact when doing a small adjustment rather than the large one we did for the first round. I elected to do one more round here, and ended up with measuring 30.01938 which is a bit closer than the first. Getting better than this isn’t very likely, because right now the biggest error factor I have is where I click on the scale-bar marking line. This line has a width of multiple pixels, and the original scale bar is simply not precise enough go try any further. (Should I measure from the outside edge of the line? middle of the line? Inside edge of the line? [Of course, for all the measuring, make sure to use the same reference points, I consistently used the middle of the line in my example measurements here])

 

 

If you have questions regarding the content of this article, please use the ProFantasy forums. It can take a long time before comments on the blog gets noticed, especially for older articles. The forums on the other hand, I frequent daily.

Leave a Reply