How To Save Image Without White Box Surrounding It
Galeden
Newcomer
Hello,
I'm trying to save my Campaign Cartographer Overworld and Dungeon maps as images I can import into Tabletop Simulator. However, attempting to save the image as any png option looks as follows:
How may I make sure just the image is saved, and how do I avoid having the floors panel be visible?
Comments
When you Save as... click the Options button and check the Crop image to aspect ratio and Restrict image to map border boxes.
That should crop out all the white stuff around the outside edges of your map.
To hide the legend you will need to hide the sheets those parts are on before you export the map.
Thank you,
I'm still getting a slight border around the left and top sides of the image
It can be hard to see unless zoomed in, but it's very visible in game. Is there anything that can be done to resolve this?
You can add a black rectangle with a small line width as a frame, but you would be wise to create a new sheet and a new layer and call them both "FRAME", or some such name to differentiate between that and the MAP BORDER, and put this frame on the new sheet and layer. You do that by making sure both are active and then picking the rectangle tool and drawing it in.
Make sure the fill of your rectangle is solid and black, or at least a darker colour than the map background. The line width will cause it to become a box rather than a solid rectangle.
If your map is of a style that already has a similar sort of frame around the map, then hide everything else and give it a bigger line width and then make sure it is bottom-most on the list of sheets and effects.
You can also try the "Rectangular Section " image type in the save as dialog. This allows you to pick the section to export exactly. It will ask you for the corners of the export after you hit the save button. With snap on, it should be easy to precisely click the top left and bottom right corners of your grid.
Remy, I’ve done that very suggestion and I still get a 1 pixel-wide line across the left and top edges of my maps after exporting. Would love to know if there’s a fix for this. Next time I export a map I’ll try Sue’s suggestion.
Seems weird that a program this powerful has an odd occurrence like this.
It's more to do with the separate rendering engine than caused by CC3. Something called ImageMagick (I think)
I’m a web developer and have used ImageMagick a lot, it has never given me any rendering problems like that. If IM really is adding that in, it has to be because of the data being passed to it for rendering.
It may also be partly to do with the fact that some maps have no frame and all have white screens, rather than black ones. Antialiasing will pick that up on one or more sides.
I solve the problem myself by turning the screen black, but that's usually a bit much for most people.
If, as an experiment, you turn off antialiasing and save as a BMP file, do you get the same result? Doing so will completely eliminate use of ImageMagick from the operation (it's unlikely that ImageMagick is related to the observed issue).
Would it be possible to get a copy of the map that's causing the problem to see if I can replicate it here?
@jslayton - I think it should be possible to get this result with most maps where the MAP BORDER green rectangle coincides exactly with the background and if you hide the decorative frame (if there is one). I'm very convinced that it happens as a result of antialiasing the edge of the map, and because the usual drawing area and/or SCREEN is white.
EDIT: yes - I can make the map I have open do it if I hide the frame I gave it and export a rectangular section. In this case the antialiasing (set to 66%) has mixed the line of pixels at the outermost edge with the white of the screen and turned them all noticeably paler. If the AA was lower it would be probably be even more noticeable.
Here is the same thing again with only 20% AA
I had to re-show the layer boundary in GIMP so you could see it against the pale background there.
But maybe it's nothing to do with the AA (proving the first part of this comment is actually wrong). Here it is again without any AA
I think this may be why most styles have at the very least a black outline rectangle as a visual frame.
The other thing I've only just noticed after 5 years mapping with CC3 (I always usually have a decorative frame so don't ever see this normally) is that there are 2 pixels of white on the top and left hand sides, where there is only one pixel of white on the bottom and right hand sides.
Another thing I've only just noticed is that despite there being no AA at all on this last image the white isn't pure. It contains tints of the colour from the map. Here (below) I have manipulated the Gamma to show these up clearly for what they are - apparently random colours.
A further experiment proves it is the screen the render is capturing, even though the rectangle being picked is exactly the map extent. Here I have kept the same settings as before but turned the screen black.
I suspect that the underlying problem may be roundoff error when converting from the floating-point space where entities are defined to the integer space where entities are rendered. It's a problem that's been around since at least CC2, but this is a good characterization of the problem, which was described only in the context of multi-band exports before. I appreciate the time that you've taken to describe the problem.
A workaround might be to expand the export image size by 1 pixel in each direction and then shave off the extra pixel using an image editing tool like ImageMagick (Using convert.exe from the CC3 installation directory's ImageMagick directory with the command line "convert inputimagename.bmp -shave 1x1 outputimagename.bmp" should shave off one pixel in each direction from inputimagename.bmp and write it to outputimagename.bmp).
Ok Joe. Thanks for the explanation.
You could do the same thing in GIMP, using Select all, and then shrink the selection by 2 pixels and do a Crop to selection.
Will the shave option work when used directly with the imagemagick step during CC3+ export? If that is possible, it can just be added to the command line specified in the CC3+ config file to have it being done automatically(obviously, this would effect every image you export)
There's something I didn't check.
I used a map exported at 2000 px on the longest side. I don't know if the margin of error gets bigger or smaller with different sized images.
@Monsen it would need to be a separate command, I think. An adventurous soul might try a pipe to see if it would work as a way of getting a second command in that text substitution, but I'm not up for that much excitement today.
Well, I’m glad to know I’m not crazy. I’m assuming this bug is so intractable that it can’t be fixed? Workarounds are nice and all…
It can't be fixed in CC3+ without a major level of effort, unfortunately.