Bug 86120 - TOOLBAR: Transparency of custom icons with partial transparency not retained
Summary: TOOLBAR: Transparency of custom icons with partial transparency not retained
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.1.6.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Toolbars
  Show dependency treegraph
 
Reported: 2014-11-10 16:36 UTC by Yousuf Philips (jay) (retired)
Modified: 2020-11-13 16:48 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
left icon doesnt have transpareny on bottom parts of the arrow (3.17 KB, image/png)
2014-11-10 16:36 UTC, Yousuf Philips (jay) (retired)
Details
here is the png used (952 bytes, image/png)
2014-12-20 07:18 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-11-10 16:36:12 UTC
Created attachment 109229 [details]
left icon doesnt have transpareny on bottom parts of the arrow

If you add a custom icon to a button that doesnt have an icon, pixels that are partially transparent no longer have transparency.

Version: 4.4.0.0.alpha1+
Build ID: d59b9b4af36148e4d8df8f3e3492116d378642e2
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2014-11-06_00:36:43
Comment 1 tommy27 2014-12-20 05:02:45 UTC
upload the custom icon so we can inspect it
as far as I remember your custom icons have to be saved as png with transparent background in order to be compatible with LibO GUI
Comment 2 Yousuf Philips (jay) (retired) 2014-12-20 07:18:18 UTC
Created attachment 111071 [details]
here is the png used
Comment 3 tommy27 2014-12-20 08:28:14 UTC
I confirm issue. it seems that when you import the custom png icon some kind of processing happens inside LibO and the transparency color is somehow lost in some pixel
Comment 4 tommy27 2014-12-20 08:38:10 UTC
that's probably what happens...

your custom icon is 24x24 pixels but imported custom icons are stored as 16x16 icons.

you can find those icons under "...User\config\soffice.cfg\modules\swriter\images\Bitmaps"

you should see a file called sc_userimages.png which is a stripe with all the custom icons you imported.

in my LibO 4.3.4.1 it has 16 pixels height

so my theory is that when your 24x24 icon is imported is resized to 16x16 and in this process some pixel that were transparent change sligtly their color hence loosing the desired transparency

try to import an icon which is 16x16 pixels from the beginning and tell if it fix things
Comment 5 tommy27 2014-12-20 08:41:38 UTC
or as a workaround you can try to manually edit the sc_userimages.png file in order to clean the wrong pixels
Comment 6 Yousuf Philips (jay) (retired) 2014-12-20 21:02:39 UTC
(In reply to tommy27 from comment #3)
> I confirm issue. it seems that when you import the custom png icon some kind
> of processing happens inside LibO and the transparency color is somehow lost
> in some pixel

Yes the processing in LO changes any pixels that are partially transparent to fully visible against a white background color.

(In reply to tommy27 from comment #4)
> your custom icon is 24x24 pixels but imported custom icons are stored as
> 16x16 icons.
> 
> you can find those icons under
> "...User\config\soffice.cfg\modules\swriter\images\Bitmaps"
>
> in my LibO 4.3.4.1 it has 16 pixels height
> 

As i used large icons, so the folder has lc_userimages.png and its 24 pixels height.
Comment 7 QA Administrators 2017-01-03 19:36:41 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2019-12-03 14:25:37 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2020-11-13 16:48:46 UTC
No problem anymore

Arch Linux 64-bit
Version: 7.1.0.0.alpha1+
Build ID: c54e1c22f30c23d00e2fe7521217569fcec59cc4
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 13 November 2020