Bug 442316 - Gimp image brush file (gih, gbr) with color saves and opens as grayscale
Summary: Gimp image brush file (gih, gbr) with color saves and opens as grayscale
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: wolthera
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2021-09-12 02:11 UTC by apelsinchoklad
Modified: 2021-09-21 14:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description apelsinchoklad 2021-09-12 02:11:32 UTC
SUMMARY
Saving and opening gimp image brush(gbr) and gimp image hose(gih) files with "Create mask from color" unchecked saves and opens as grayscale. (krita-nightly_7f1fe37)

.gih and .gbr files saved in Krita 4.4.8 opens as grayscale but appears correctly when used as brush tip. ​


STEPS TO REPRODUCE
1. Paint something with colors
2. Export as gih or gbr file with "Create mask from color" unchecked
3. Open file/import brush tip and set brush mode to Color image

OBSERVED RESULT
The file/brush stamp appears as grayscale, both in krita 5 and 4.4.8

EXPECTED RESULT
🌈

SOFTWARE/OS VERSIONS
macOS: 10.13.6 High Sierra
Krita Plus: 7f1fe37

ADDITIONAL INFORMATION
When creating brush tip with the +Stamp button in the Brush Editor; Brush Style: Animated appears as grayscale in the preview but works correctly on canvas.

https://krita-artists.org/t/greyscale-animated-brush-does-it-have-to-be-that-way/28769
Comment 1 wolthera 2021-09-19 13:45:13 UTC
Confirmed, very strange, it seems the layer and the document is an RGB one, but yes, it doesn't load the data as RGB?
Comment 2 wolthera 2021-09-19 14:13:21 UTC
Git commit eb127330c81d739f636c413c8b63b51d239706c6 by Wolthera van Hövell tot Westerflier.
Committed on 19/09/2021 at 14:10.
Pushed by woltherav into branch 'krita/5.0'.

Interpret gbr/gih brush with application=imagestamp to load with color.

Otherwise, the brush image returns a grayscale image, which is useful for
using the brush in the engines, but not for loading it as a document.

M  +3    -1    plugins/impex/brush/kis_brush_import.cpp

https://invent.kde.org/graphics/krita/commit/eb127330c81d739f636c413c8b63b51d239706c6
Comment 3 wolthera 2021-09-19 14:13:50 UTC
Git commit da4a70a77eb52db06babbf66e777922420546f2c by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 19/09/2021 at 14:13.
Pushed by woltherav into branch 'master'.

Interpret gbr/gih brush with application=imagestamp to load with color.

Otherwise, the brush image returns a grayscale image, which is useful for
using the brush in the engines, but not for loading it as a document.


(cherry picked from commit eb127330c81d739f636c413c8b63b51d239706c6)

M  +3    -1    plugins/impex/brush/kis_brush_import.cpp

https://invent.kde.org/graphics/krita/commit/da4a70a77eb52db06babbf66e777922420546f2c
Comment 4 apelsinchoklad 2021-09-21 09:50:00 UTC
(In reply to wolthera from comment #3)
> Git commit da4a70a77eb52db06babbf66e777922420546f2c by Wolthera van Hövell,
> on behalf of Wolthera van Hövell tot Westerflier.
> Committed on 19/09/2021 at 14:13.
> Pushed by woltherav into branch 'master'.
> 
> Interpret gbr/gih brush with application=imagestamp to load with color.
> 
> Otherwise, the brush image returns a grayscale image, which is useful for
> using the brush in the engines, but not for loading it as a document.
> 
> 
> (cherry picked from commit eb127330c81d739f636c413c8b63b51d239706c6)
> 
> M  +3    -1    plugins/impex/brush/kis_brush_import.cpp
> 
> https://invent.kde.org/graphics/krita/commit/
> da4a70a77eb52db06babbf66e777922420546f2c

Opening now works fine. 👍 Saving from menu (File —> Save/Save as.../Export...) still saves as grayscale (krita-nightly_355c72f).
Comment 5 wolthera 2021-09-21 14:12:45 UTC
Git commit 55aba9a7a818c7f2df843979bee8c0699887c118 by Wolthera van Hövell tot Westerflier.
Committed on 21/09/2021 at 14:12.
Pushed by woltherav into branch 'krita/5.0'.

Also fix saving gbr/gih brushes.

Seems like an overzealous change that caused this one...

M  +1    -1    plugins/impex/brush/kis_brush_export.cpp

https://invent.kde.org/graphics/krita/commit/55aba9a7a818c7f2df843979bee8c0699887c118
Comment 6 wolthera 2021-09-21 14:13:05 UTC
Git commit 04ac88205e1c8cfafebcbd96da8166c18de1738d by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 21/09/2021 at 14:13.
Pushed by woltherav into branch 'master'.

Also fix saving gbr/gih brushes.

Seems like an overzealous change that caused this one...


(cherry picked from commit 55aba9a7a818c7f2df843979bee8c0699887c118)

M  +1    -1    plugins/impex/brush/kis_brush_export.cpp

https://invent.kde.org/graphics/krita/commit/04ac88205e1c8cfafebcbd96da8166c18de1738d