https://bugs.freedesktop.org/show_bug.cgi?id=64717

          Priority: medium
            Bug ID: 64717
          Assignee: [email protected]
           Summary: When registering the png file with alpha information
                    to the toolbar, it was discolored.
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: 3.6.6.2 release
         Component: Spreadsheet
           Product: LibreOffice

LibreOffice 4.0.3/3.6.6/3.5.7    calc/write
ubuntu 12.04 32bit

This problem occurs by Linux.
It does not occur in Windows.

The size of the following picture is 16*16 pixels.
http://www.ne.jp/asahi/soft/miday/Calc_Moji/pngdata.zip
256tr.png    True color with alpha information   A background is transparent.
256wh.png    True color                          A background is white.
8tr.png      Index color                         A background is transparent.
8wh.png      Index color                         A background is white.

By Calc/Write, the following operations are carried out and it registers as an
icon of a toolbar.

menu View -> Toolbars -> Customize -> 
Toolbars -> Commands -> Modify -> Change Icon -> 
Import

Pictures other than 256tr.png are satisfactory.
256tr.png will become white.
http://www.ne.jp/asahi/soft/miday/Calc_Moji/errorIcon.png

The alpha information on the original range of 16*16 is not right.

At 256tr.png, one pixel is "RGBA" and is 32 bits. 
"A" is alpha information and is 0 - 255.
  0 is un-transparent.
  255 is transparent.
This alpha information is reversed in 16*16.

For example, in LO3.5, if the following line is changed, it will be repaired.
File
 vcl/source/gdi/outdev2.cxx
Method
 OutputDevice::ImplBlendWithAlpha

Original
            pAlphaW->SetPixel( nY, nX, Color(255L-nResAlpha, 255L-nResAlpha,
255L-nResAlpha) );
After correction
            pAlphaW->SetPixel( nY, nX, Color(nResAlpha, nResAlpha, nResAlpha)
);

nY and nX are 0 - 15.

But since it thinks that Windows will be influenced if this is corrected, I
think that it is not right.
I am not investigating any source other than LO3.5.
I am not investigating the source of Windows/Mac, either.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to