Imported PNG symbol not rendering properly

Ahoy mappers!

So recently, I imported a symbol into my big map project that I've been making for years using the "Modern Political" annual style from 2010. MP comes with an airport symbol, it's basically a red silhouette of a plane at an angle, but I preferred the look of a symbol where the plane silhouette is inside a box. I found this neat icon here:
image
I used Symbol Manager > PNG import to get it into my map. I had to re-import it a few different times to play with the import settings, but regardless,there's an issue. See how the icon is surrounded by a black outline? Well, when I render the whole map as a PNG, that outline doesn't come through correctly:
image
This image is a small part of the map cropped from a large PNG (exported at 9000 x 8000 resolution) of the entire map. So while the image of the whole map is 9000 x 8000, this cropped piece by itself is only 372 x 301.
On the new airport symbol (the one on the left), see how the black outline isn't fully there? It's correct only on the left side. There's a bit of it in the upper right and lower right corners, but it's missing from the top, right, and bottom.

After seeing this, I made another PNG using the "export a rectangular section" option in CC3+, in order to produce an image focused on this same area, but at a higher resolution than the cropped image above (6000 x 5000). In THAT image, the outlines are all properly rendered and visible around the edge on all sides:
image
So is this a resolution problem? CC3+ is unable to properly render these outlines unless the res is extremely high (even higher than 9000 x 8000 for the full map, which I can't go above - I get a "not enough memory" error if I try to go higher than that)? I find that odd, since it has no trouble properly rendering other symbols that have an outline, such as the round multi-colored dots which mark cities (which you can see several of in this image). When importing the Airport symbol, I tried it with the "Hide picture outline" box both checked and unchecked. It didn't seem to make any difference.

So how could I go about fixing this so that that black outline is properly displayed when the full map is rendered? Is it possible I did something wrong when importing the PNG as a symbol? Thanks for any and all help!

Comments

  • RalfRalf Administrator, ProFantasy 🖼️ 18 images Mapmaker
    edited May 2019
    That's a bit weird. Did you create different resolutions when you imported the PNG? Do you get better results with the attached version of the image?

    Alternatively, you could remove the black outline in the png and add a vector outline in the CC3+ symbol.

    Edit: Or even better yet, redraw that symbol completely as a vector symbol - it's a fairly simple shape and would then better match the other symbols of the Modern Political style.
  • MonsenMonsen Administrator 🖼️ 46 images Cartographer
    edited May 2019
    Note that things like this happen simply because there isn't enough pixels in the destination render.

    I did a few calculations based on the actual symbol you sized, and the size which it is represented in the cropped image. This shows that at that size, the black line around the symbol is going to be 0.4 pixels wide. Now, images only operate in whole pixels, so when something is less than a pixel, a decision needs to be made if the size should be rounded up or down to the nearest whole pixel (0 or 1 in this case). Of course, since the pixel count in any image is finite, whenever you round up somewhere, you need to round down somewhere else, so you cannot simply round up everything. Something less than half a pixel is therefore a good candidate for rounding down. Different techniques are used by image renders to somehow offset this problem, but due to the pixels being a limiting factor, it can't always come out perfect.
    This is a problem that ALWAYS happens when you render things out to an image from any program, it is just more noticeable when it happen to be a clear line like this. You can see a similar thing happen with the roads in your two samples.
  • CielCiel Traveler
    edited May 2019
    Thanks for the replies guys, didn't mean to vanish, just been a busy week.
    Posted By: RalfThat's a bit weird. Did you create different resolutions when you imported the PNG?
    Nope, didn't select that option.
    Do you get better results with the attached version of the image?
    Did you mean, the one in your post? If so, I downloaded it and tried it, but no change.
    Alternatively, you could remove the black outline in the png and add a vector outline in the CC3+ symbol.

    Edit: Or even better yet, redraw that symbol completely as a vector symbol - it's a fairly simple shape and would then better match the other symbols of the Modern Political style.
    Here is where I get lost. Vector symbols (and the significance of any given symbol being or NOT being a vector) is one of those topics that I knew absolutely nothing about before I began using CC3. So: what exactly IS a "vector symbol" as opposed to not? What would be the significance of it being one, in the context of possibly solving this problem? And how would I go about drawing something "as a vector"?
    Posted By: MonsenNote that things like this happen simply because there isn't enough pixels in the destination render.

    I did a few calculations based on the actual symbol you sized, and the size which it is represented in the cropped image. This shows that at that size, the black line around the symbol is going to be 0.4 pixels wide. Now, images only operate in whole pixels, so when something is less than a pixel, a decision needs to be made if the size should be rounded up or down to the nearest whole pixel (0 or 1 in this case). Of course, since the pixel count in any image is finite, whenever you round up somewhere, you need to round down somewhere else, so you cannot simply round up everything. Something less than half a pixel is therefore a good candidate for rounding down. Different techniques are used by image renders to somehow offset this problem, but due to the pixels being a limiting factor, it can't always come out perfect.
    This is a problem that ALWAYS happens when you render things out to an image from any program, it is just more noticeable when it happen to be a clear line like this. You can see a similar thing happen with the roads in your two samples.
    Ohh interesting. That actually does make sense as to why this could happen, especially since I've noticed that the final symbol in an exported PNG of the map can change depending on both the total resolution of the PNG itself, AND the size of the symbol as placed within CC3+ before the export.
  • LoopysueLoopysue ProFantasy 🖼️ 39 images Cartographer
    On that last point it might help to re-import it with the create other resolutions box checked.
  • RalfRalf Administrator, ProFantasy 🖼️ 18 images Mapmaker
    A vector symbol is a symbol consisting of CC3+ internal entities like polygons, lines, paths, circles, etc. Bitmap symbols are ones that reference an external bitmap file like your airport PNG (a symbol can have both types of content, but let's ignore that here).

    Vector symbols have the advantage that CC3+ treats all their constituent parts as separate entities when rendering, making it less likely that a line or path will "vanish" in the rendering process. Try the attached symbol as an alternative and see how it renders.
  • 4 months later
  • CielCiel Traveler
    edited September 2019
    So SOMEHOW, four (4!) months ago, I lost track of this thread, and whenever I visited since then, I SOMEHOW didn't realize that there were any new posts after my last one. So until a couple days ago, I completely missed your post, Ralf, in which you provided exactly what I was hoping to be able to get - a version of the symbol that works and renders perfectly! So a very belated thank you. I really like this symbol better than the default airport symbol in Modern Political, so it's nice to be able to use it!

    One other thing, in case I find more PNG symbols I want to use down the road: It seems that "CC3 works better when the imported symbols are vectors rather than PNGs" is REALLY true, considering that change alone seemed to be enough to make this problem go away. A brief google search tells me I can use Inkscape to convert a PNG to a vector rather easily, so is that pretty much it? Make that change and then it's ready to be imported into CC3+?
  • LoopysueLoopysue ProFantasy 🖼️ 39 images Cartographer
    I've used Inkscape to convert bitmap to vector. It works very well, but is so incredibly accurate that every tiny imperfection in the original bitmap is expressed as a cluster of nodes so close that you don't even realise they are there. Be careful about just how many nodes you get as a result of such a conversion. Sometimes it is easier to import the bitmap source as a file into CC3 (not a symbol), and simply draw the polygon vector shape on top of it to make your new vector symbol that way. It will most likely have much less than half the number of nodes than the one you automatically converted in Inkscape.
  • MonsenMonsen Administrator 🖼️ 46 images Cartographer
    edited September 2019
    A note about vector vs raster symbols: For this particular problem. which was really about line widths in the symbol beeing to small (you may remember my explanation above), a vector symbol works better because lines in vector symbols are their own entities, rather than just a couple of pixels in an image. But for more complicated symbols, you'll never be able to get the colors and complexity a raster image can offer. But when you try to reduce the size of a raster image (like you did here), there will always be some problems with that process, no matter the program, because when you reduce the image in size, there are fewer pixels available to hold information, so some information will always get lost, this isn't strictly a CC3+ problem.

    And while inkscape can convert things, it is not a one-step process, as it can't create an image directly in the CC3+ vector format, you'll have to export it as an autocad file, and then import that into CC3+, which will net you all the outlines you need, but there is still quite some work left using these to recreate the original look of the image. And as Sue said, these outlines are also way too detailed.
  • CielCiel Traveler
    edited September 2019
    Understood! Thank you both very much for the explanations.

    I'll cross that bridge (the potential complexity or difficulty of trying to convert a PNG to a vector for use in CC3+) when and if I come to it.

    And even though I already did, I'm going to thank Ralf again for just doing that whole conversion thing for me, lol. I still feel bad that I didn't see it until 4 months later, I somehow didn't notice that this thread I had made had new replies in it. So yeah, thank you again!
  • We are a talkative bunch some days, so its always a good idea to go to page 2 or 3 in this forum.
Sign In or Register to comment.