Bug 406155 - Flattening the image resets background color and opacity
Summary: Flattening the image resets background color and opacity
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: OpenGL Canvas (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-02 15:40 UTC by Storm Engineer
Modified: 2019-04-04 12:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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