--- ID: ISSUE-005 Type: Issue Status: Resolved Priority: High Labels: [bug, core, image-processing] Created: 2025-04-22 Updated: 2025-04-22 Related: --- # [ISSUE-005]: Alpha Mask channel not processed correctly ## Description When processing source images that contain an alpha channel intended for use as a MASK map, the tool's output for the MASK map is an RGBA image instead of a grayscale image derived solely from the alpha channel. ## Current Behavior If a source image (e.g., a PNG or TIF) has an alpha channel and is classified as a MASK map type, the resulting output MASK file retains the RGB channels (potentially with incorrect data or black/white values) in addition to the alpha channel, resulting in an RGBA output image. ## Desired Behavior / Goals When processing a source image with an alpha channel for a MASK map type, the tool should extract only the alpha channel data and output a single-channel (grayscale) image representing the mask. The RGB channels from the source should be discarded for the MASK output. ## Implementation Notes (Optional) (This requires modifying the image processing logic for MASK map types to specifically isolate and save only the alpha channel as a grayscale image. Need to check the relevant sections in `asset_processor.py` related to map processing and saving.) ## Acceptance Criteria (Optional) * [ ] Process an asset containing a source image with an alpha channel intended as a MASK map. * [ ] Verify that the output MASK file is a grayscale image (single channel) and accurately represents the alpha channel data from the source. * [ ] Verify that the output MASK file does not contain redundant or incorrect RGB channel data.