Bug 500851

Summary: Gradients in Krita duplicate, alter, and display incorrectly after reopening a .kra file.
Product: [Applications] krita Reporter: Simon <simon.p.heggie>
Component: Resource ManagementAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: major CC: info
Priority: NOR    
Version First Reported In: 5.2.9   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
URL: https://bugs.kde.org/show_bug.cgi?id=445390
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Zip file containing a bug report, screenshots, and 3 example KRAs to check out.

Description Simon 2025-02-28 03:51:04 UTC
Created attachment 178964 [details]
Zip file containing a bug report, screenshots, and 3 example KRAs to check out.

SUMMARY ---------------------------------------------------------------------------------------------------------

Gradients in Krita duplicate, alter, and display incorrectly after reopening a .kra file.
This appears to affect:
* Gradient Overlay (Layer FX)
* Outline Fill (Layer FX)
* And other gradient based panels show a wrong/depreciated thumbnail.

Issues observed:

Wrong gradient thumbnails for gradients &
Re-selecting a gradient does not match its thumbnail

STEPS TO REPRODUCE ---------------------------------------------------------------------------------------------------------

1. Create a new document (at least 512x512 px).
2. Zoom in after creating the document.
3. Draw a rectangle filling the entire canvas.
4. Apply the “GPS Eye (Blue)” gradient in one of these ways:
5. Gradient Overlay (Layer FX)
6. Outline Fill (Layer FX)
7. Vector Shape Fill Gradient
8. Save the .kra file and close Krita.
9. Reopen Krita and observe:
10. Colors are missing or altered.
11. Duplicate gradients appear in presets.
12. Vector gradient thumbnails are incorrect.
13. Selecting a gradient applies a different result than the preview.

OBSERVED RESULT ---------------------------------------------------------------------------------------------------------

* Gradients are altered on reload.
* Duplicate gradients are created.
* Vector gradient thumbnails are incorrect.
* Re-selecting a gradient applies the wrong colors.

EXPECTED RESULT ---------------------------------------------------------------------------------------------------------

* Gradients should remain unchanged after reopening.
* No duplicate gradients should be created.
* Thumbnails should match actual gradients.

SOFTWARE/OS VERSIONS ---------------------------------------------------------------------------------------------------------

Operating System: Nobara Linux 40
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1

---

ATTACHED ---------------------------------------------------------------------------------------------------------

LOG: (Attached) 
SCREENSHOTS: (Attached) 
EXAMPLE KRAs: (Attached)

---

ADDITIONAL INFORMATION ---------------------------------------------------------------------------------------------------------

Hardware: Intel i9-13900HX, NVIDIA RTX 4090, 31GB RAM

Always breaks with with layer FX, doesn't seem to break for vector gradients as much it just breaks the thumbnail sometimes.

POSSIBLY RELATED:

* https://www.reddit.com/r/krita/comments/wx99bm/is_saving_gradient_maps_borked_or_am_i_missing/

* https://bugs.kde.org/show_bug.cgi?id=445390 (Very likely a duplicate, suggesting a ticket merge.)

------------------------------------------------------------------------------------------------------------------------------------------------------------------

FINAL WORD:

Thank-you Krita devs for your software. I may be here reporting a bug, but I love Krita. You have freed my from the Adobe curse and I am eternally grateful. It's an honour to do my part where I can.
Unlike every bug report that seemed to fall on deaf earts with Adobe, I feel my time is wisely invested. :) 
I just see you guys copping way too much flack from randoms on the forum when this to me is the best free Photoshop replacement I have ever encountered. (And I have tried GIMP... a lot.) I think your free opensource product is actually comparable to the likes of Affinity Photo. I think together we can do anything we put our minds to empower artists.

Keep up the good work, and don't hesitate to reach about anything.

-S
Comment 1 Wolfgang Baer 2025-03-01 10:22:42 UTC
Partly confirmed with Krita 5.2.9 (installed version from krita.org) on Windows 10 and 11.

There is an issue with gradients behaving differently if assigned to bitmap laywers vs. vector layers. In my testing vector laywers are affected.
The issue seems to be related to the opacity values set for color nodes on the gradient.

Please refer to this reply on krita-artists.org to see the findings (I do not know how to add the attachments to this comment, so I kindly aks to watch them in the linked thread):

https://krita-artists.org/t/gradient-duplication-corruption-in-krita-5-2-9/116672/8?u=cgidesign