mapeditor / mapeditor/tiled

Save as Image modifies alpha

Open
#549 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
12.9k
Forks
2k
Avg merge
4h 27m
Merged PRs (30d)
8

Description

I just noticed when you have a map with tiles using certain alpha values, and you go to File->Save as Image, then the image won't have the original colors from the tileset.
I ran into this before in other editors, it's possible image loading already pre-multiplies the alpha values in colors. (Adobe's API does this too.)

In effect the tiles you see in the exported image will look like the tiles from your tileset, but they won't be equal. Here's an image to test, just make a map using this image as a tileset, paint some tiles, then do File->Save as Image and compare the color values from the exported file with this image in a graphics program like gimp or photoshop and you'll see the difference:
![test](https://f.cloud.github.com/assets/5243319/1452142/ccdbeaca-42c0-11e3-8817-b5ca019354bd.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue through File->Save as Image with the linked test image used as a tileset, then compare the exported pixel values with the source in an image editor. Trace the image-loading and save-as-image paths to find where alpha values are altered. Done means exported tiles preserve the original tile color values, including partially transparent pixels.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.