Bug 406155

Summary: Flattening the image resets background color and opacity
Product: [Applications] krita Reporter: Storm Engineer <storm.anthro>
Component: OpenGL CanvasAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Storm Engineer 2019-04-02 15:40:00 UTC
Flattening the image resets background color to #000000 and opacity to 0. This results in the image having a transparent BG even if it didn't have before.


STEPS TO REPRODUCE
1. Set Image background color and opacity to any value
2. Flatten image

OBSERVED RESULT
BG color and opacity are reset

EXPECTED RESULT
BG color and opacity should be preserved

SOFTWARE/OS VERSIONS

Krita

 Version: 4.2.0-pre-alpha (git 9dac9dc)
 Languages: en_US
 Hidpi: false

Qt

  Version (compiled): 5.12.2
  Version (loaded): 5.12.2

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.0.5-arch1-1-ARCH
  Pretty Productname: Arch Linux
  Product Type: arch
  Product Version: unknown


Hardware Information

  GPU Acceleration: auto
  Memory: 16006 Mb
  Number of Cores: 8
  Swap Location: /tmp
Comment 1 Halla Rempt 2019-04-03 07:23:27 UTC
Sorry, I cannot reproduce this.

I created an 8 bit rgba image with the background color set to pink, the opacity to 27% and with two layers. The background type was set to As Raster. I painted on the second layer, pressed ctrl-shift-e and the merged image was still pink and transparent.
Comment 2 Storm Engineer 2019-04-03 16:11:01 UTC
Just built master fresh again.

At the moment I can't reproduce either.
Comment 3 Dmitry Kazakov 2019-04-04 12:49:52 UTC
Git commit 2c92f588e833e50f2ab2071e59497f11aa05609c by Dmitry Kazakov.
Committed on 04/04/2019 at 12:49.
Pushed by dkazakov into branch 'master'.

Keep image BG color when flattening the image

M  +4    -2    libs/image/kis_layer_utils.cpp

https://commits.kde.org/krita/2c92f588e833e50f2ab2071e59497f11aa05609c