Bug 84002 - Add Adobe .ase colour palette support
Summary: Add Adobe .ase colour palette support
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: low enhancement
Assignee: Chris Laplante
URL:
Whiteboard: target:5.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-17 14:35 UTC by Philipp Weissenbacher
Modified: 2020-08-09 09:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Weissenbacher 2014-09-17 14:35:21 UTC
With his recent GSoC work, Krisztian Pinter managed to add support to load LO's own .soc and Gimp's .gpl colour palette formats.

Another very popular format for colour palettes is Adobe's .ase format.
It's supported by Adobe Photoshop and Adobe Illustrator. A popular website to create colour palettes is https://kuler.adobe.com/.

To ease implementation, there are already some implementations available:
A GPL-licensend reader in Python: http://utilitymill.com/edit/ASE_File_Data_Reader

A new BSD-licensed reader in C++: https://code.google.com/p/gpick/source/browse/source/uiExport.cpp#277

We might just piggy back on the latter and reuse their code (if the license is compatible).
Comment 1 Philipp Weissenbacher 2014-10-14 18:30:50 UTC
If you like this issue, please consider donating for it via FreedomSponsors.org: https://freedomsponsors.org/issue/570/add-adobe-ase-colour-palette-support
Comment 2 Chris Laplante 2015-02-24 01:49:49 UTC
I'm interested in working on this bug. Just wanted to check what is required licensing-wise to port the C++ code Philipp linked to. According to this page, the licenses are compatible: https://www.mozilla.org/MPL/license-policy.html#Licenses_Compatible_with_the_MPL
Comment 3 Tomaz Vajngerl 2015-02-24 02:28:12 UTC
.ase is a quite simple format - you can just write it from scratch and avoid license issues. Porting would probably need a half rewrite anyway. In [1] you can find all you need to implement support. All you need additionally is only an example file with known entries.

I see some entries can be in CMYK - you need to convert those to RGB like this is done in [2].

[1] http://www.selapa.net/swatches/colors/fileformats.php#adobe_ase
[2] http://opengrok.libreoffice.org/xref/core/vcl/source/filter/jpeg/jpegc.cxx#188
Comment 4 Chris Laplante 2015-02-24 02:59:01 UTC
(In reply to Tomaz Vajngerl from comment #3)
> .ase is a quite simple format - you can just write it from scratch and avoid
> license issues. Porting would probably need a half rewrite anyway. In [1]
> you can find all you need to implement support. All you need additionally is
> only an example file with known entries.
> 
> I see some entries can be in CMYK - you need to convert those to RGB like
> this is done in [2].
> 
> [1] http://www.selapa.net/swatches/colors/fileformats.php#adobe_ase
> [2]
> http://opengrok.libreoffice.org/xref/core/vcl/source/filter/jpeg/jpegc.
> cxx#188

Perfect, thanks. One other small thing. When I go to the Area menu and click the Color tab, I am not able to load .gpl files. I can only load .soc files based on the extension filters of the load file dialog. Is this a bug?
Comment 5 Tomaz Vajngerl 2015-02-24 07:15:36 UTC
Support for .gpl was added only to the new color picker. What area tab has should be considered deprecated and will be removed once a global solution is in place (grown from the the color picker), but currently nobody works on that.
Comment 6 Chris Laplante 2015-02-26 22:56:31 UTC
Gerrit change: https://gerrit.libreoffice.org/#/c/14661/
Comment 7 Tomaz Vajngerl 2015-02-26 23:30:56 UTC
Thanks, looks good. I'll try and review the patch ASAP.
Comment 8 Commit Notification 2015-03-01 04:01:40 UTC
Chris Laplante committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=797c48f0f74501def9f47444538c0e110fcfcca1

tdf#84002 Add support for .ase color palettes

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Chris Laplante 2015-03-01 04:13:31 UTC
Thanks Tomaz - I'll add a note about this in the 4.5.0 release notes. Should it go under Core or GUI?
Comment 10 Tomaz Vajngerl 2015-03-01 05:15:52 UTC
Maybe GUI. If someone thinks it is wrong, he will move it to a "correct" place.
Comment 11 Mike §chinagl 2015-05-21 16:10:45 UTC
This bug fix is mentioned in the release notes of the coming LibreOffice 5.0 (see release notes https://wiki.documentfoundation.org/ReleaseNotes/5.0). Therefore it would be wonderful if this feature really worked well, otherwise it should not be mentioned in the release notes. In the notes it reads:

Support for reading Adobe Swatch Exchange (.ase) color palettes. Handles CMYK, RGB, and grayscale color models. LAB colors are not yet supported, and are replaced by black during import. (tdf#84002, sponsored by LibreOffice users through FreedomSponsors.org) (Chris Laplante)
Comment 12 Adolfo Jayme Barrientos 2015-05-21 21:42:09 UTC
Disregard the previous comment. That user has been spamming everyone with that comment, apologies.
Comment 13 Mike §chinagl 2015-05-22 14:15:09 UTC
(In reply to Adolfo Jayme from comment #12)
> Disregard the previous comment. That user has been spamming everyone with
> that comment, apologies.

Please consider my clarifying statement:
https://bugs.documentfoundation.org/show_bug.cgi?id=86138#c13
Comment 14 Ulrich Windl 2015-08-10 13:34:05 UTC
(In reply to Mike §chinagl from comment #11)
> (...) LAB colors are not yet supported, and are replaced by black during import.(...)
Why not interpreting the L-component at least making gray-scale (better than just black)?
Comment 15 vihsa 2017-07-02 07:02:37 UTC
i am verifying file formats given https://en.m.wikipedia.org/wiki/LibreOffice in libreoffice viewer.

if this is not yet implemented in libreoffice viewer, i request you to add support.