Bug 54820 - LOdev/LibO 128x128px and 256x256px application ("main") icons are too small now on Mac OS X
Summary: LOdev/LibO 128x128px and 256x256px application ("main") icons are too small n...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) macOS (All)
: medium minor
Assignee: Nicholas Shanks
URL:
Whiteboard: target:3.7.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-09-12 16:15 UTC by Roman Eisele
Modified: 2012-09-18 10:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing that the LOdev app icon now appears too small in the Dock (374.70 KB, image/png)
2012-09-12 16:15 UTC, Roman Eisele
Details
The 128x128px LibO Icon from LOdev 2012-09-06 (correct) (94.86 KB, image/png)
2012-09-13 06:28 UTC, Roman Eisele
Details
The 128x128px LibO Icon from LOdev 2012-09-11 (wrong) (141.86 KB, image/png)
2012-09-13 06:29 UTC, Roman Eisele
Details
The 256x256px LibO Icon from LOdev 2012-09-06 (wrong) (150.79 KB, image/png)
2012-09-13 06:29 UTC, Roman Eisele
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Eisele 2012-09-12 16:15:11 UTC
Created attachment 67057 [details]
Screenshot showing that the LOdev app icon now appears too small in the Dock

At least since the master build (LOdev) with pull time 2012-09-11 01:28:39, the application icon of LOdev/LibO appears too small in the Dock, at least on Mac OS X 10.6.8. Please see the attached screenshot of the Dock with various LibO versions.

The icon is not only smaller than in previous versions (the next icon visible on the screenshot comes from the master build with pull time 2012-09-06 07:07:33), but also smaller than the icons of all the other applications visible in the doc.

Not a big issue, but irritating.
Comment 1 Alex Thurgood 2012-09-12 17:33:45 UTC
Hi Roman,

Can't say I've noticed (yet), but this might be a result of the icon cleanup on OSX that took place recently and was pushed to master ?


Alex
Comment 2 Alex Thurgood 2012-09-12 17:37:18 UTC
On 10.8.1, the icons between LO 3.3.4 and LOdev daily 20120911 appear to be the same size, so problem specific to OSX 10.6 ?


Alex
Comment 3 Roman Eisele 2012-09-13 05:41:13 UTC
Hi Alex,

(In reply to comment #1)
> Can't say I've noticed (yet), but this might be a result of the icon cleanup on
> OSX that took place recently and was pushed to master ?

I was too tired yesterday to add a comment about that, but I had the same idea.

(In reply to comment #2)
> On 10.8.1, the icons between LO 3.3.4 and LOdev daily 20120911 appear to be the
> same size, so problem specific to OSX 10.6 ?

Please double-check this. If it is true, and this is really only a Mac OS X 10.6 issue, I would say myself that the developers can ignore the complete issue savely.

But I am still curious what makes the difference, i.e.: why does the icon now look smaller?; and if this is only true on older Mac OS X version, it is even stranger ...
Comment 4 Roman Eisele 2012-09-13 06:27:47 UTC
(In reply to comment #3)
> Please double-check this. If it is true, and this is really only a Mac OS X
> 10.6 issue, I would say myself that the developers can ignore the complete
> issue savely.

No -- wait -- I can explain what’s going wrong, and there is really a little error in the new icons! Screenshots and explanations coming ...
Comment 5 Roman Eisele 2012-09-13 06:28:28 UTC
Created attachment 67074 [details]
The 128x128px LibO Icon from LOdev 2012-09-06 (correct)
Comment 6 Roman Eisele 2012-09-13 06:29:15 UTC
Created attachment 67075 [details]
The 128x128px LibO Icon from LOdev 2012-09-11 (wrong)
Comment 7 Roman Eisele 2012-09-13 06:29:40 UTC
Created attachment 67076 [details]
The 256x256px LibO Icon from LOdev 2012-09-06 (wrong)
Comment 8 Roman Eisele 2012-09-13 06:50:35 UTC
Now I can explain what’s wrong. To see, I have extracte the LibreOffice application icon from the LOdev (master) builds 2012-09-06 and 2012-09-11. In any (newer) version of LibreOffice/LOdev, the application icon is called “main.icns” and is located at
  LibreOffice.app/Contents/Resources/main.icns

In the LOdev (master) build 2012-09-06, “main.icns” contains only four sizes of the icon: 16x16, 32x32, 64x64, and 128x128 px.

In the LOdev (master) build 2012-09-11, and in any newer build, “main.icns” contains two more icon sizes which are used for the newer Mac OS X versions:
16x16, 32x32, 64x64, 128x128, 256x256, and 1024x1024 px.
This is a big improvement, and it is due to the commit:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0cb1b9685877f6aeaddf1088ae5008e38bade6f9
“higher-resolution OpenDocument icons for MacOSX” by Nicholas Shanks <nickshanks@nickshanks.com>, which addes the 256x256 and 1024x1024 px icons.

But since that commit, not only two new icon sizes have been added to “main.icns” -- also the existing icon sizes are modified. I don’t know what’s going on here, but the screenshots show it.

In the LOdev (master) build 2012-09-06, the 128x128px icon (see attachment 67074 [details]) is correct: the page symbol uses the complete area of the 128x128px image, only at the left and right are little (transparent) margins, because the page symbol has portrait orientation (height > width).

Now in the LOdev (master) build 2012-09-11, the 128x128 icon (see attachment 67075 [details]) is wrong: the page symbol does NOT use the complete area of the 128x128px image, it is smaller now, there is a big additional (transparent) margin all around the image. This explains very well why the icon now appears too small in the Dock -- and probably also in other places.

The same defect is also to be observed in the new 256x256px icon (see attachment 67076 [details]). Again, the page symbol does NOT use the complete area of the 128x128px image, it is smaller now, there is a big additional (transparent) margin all around the image.

Only the new 1024x1024px icon is correct -- it uses the complete area.


I can’t explain what’s going wrong in the technical sense. If I inspect the source image for the 128x128px icon at

http://cgit.freedesktop.org/libreoffice/core/tree/sysui/desktop/icons/hicolor/128x128/apps/main.png

it is still correct (the page symbol DOES use the complete area of the 128x128px image). But when that image arrives in the “main.icns” file, it is scaled down, so there is an error somewhere in the process of assembling the “main.icns” file.
Comment 9 Roman Eisele 2012-09-13 06:54:40 UTC
@ Alex:
Can you confirm my observation about the files -- i.e., when you open
   LOdev.app/Contents/Resources/main.icns
(of a recent LOdev build) with Apple’s Preview application and inspect the particular icon sizes, can you confirm that in the 128x128px and 256x256px icons, the page symbol does not use the complete area of the image?

(To see the complete are image of the image, which is hard to see because the margin is transparent, plese click on the image and then press Command + A, to select the complete image: the selection border shows correctly the real margin of the image.)

Thank you very much!
Comment 10 Roman Eisele 2012-09-13 06:58:39 UTC
(In reply to comment #2)
> On 10.8.1, the icons between LO 3.3.4 and LOdev daily 20120911 appear to be the
> same size, so problem specific to OSX 10.6 ?

I guess Mac OS X 10.8 uses the 1024x1024px icon for displaying the dock, therefore the error is not visible there (as said above, the 1024x1024px icon size is OK).
Comment 11 Roman Eisele 2012-09-13 10:16:27 UTC
Again -- I found it: in his commit
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0cb1b9685877f6aeaddf1088ae5008e38bade6f9
“higher-resolution OpenDocument icons for MacOSX”,
Nicholas Shanks has not only supplied the different .png images of new icon sizes, which are completely correct, but also new ready .icns files.

Here is the change in the “main.icns” file:

http://cgit.freedesktop.org/libreoffice/core/diff/sysui/desktop/icons/main.icns?id=0cb1b9685877f6aeaddf1088ae5008e38bade6f9

And it is very easy to see that the old version:

http://cgit.freedesktop.org/libreoffice/core/tree/sysui/desktop/icons/main.icns?id=c50de9b0fc803a979d6cb6987999740fa36be3d6

includes a correct 128x128px icon, but the new version:

http://cgit.freedesktop.org/libreoffice/core/tree/sysui/desktop/icons/main.icns?id=0cb1b9685877f6aeaddf1088ae5008e38bade6f9

while adding the valuable new icon sizes, changes the 128x128px icon to a wrong version (with wide transparent margin) and adds an incorrect version of the 256x256px icon which suffers from the same defect.
Comment 12 Alex Thurgood 2012-09-13 10:22:20 UTC
(In reply to comment #9)
> @ Alex:
> Can you confirm my observation about the files -- i.e., when you open
>    LOdev.app/Contents/Resources/main.icns
> (of a recent LOdev build) with Apple’s Preview application and inspect the
> particular icon sizes, can you confirm that in the 128x128px and 256x256px
> icons, the page symbol does not use the complete area of the image?
> 
> (To see the complete are image of the image, which is hard to see because the
> margin is transparent, plese click on the image and then press Command + A, to
> select the complete image: the selection border shows correctly the real margin
> of the image.)
> 


Hi Roman,

Testing this morning with 
libreoffice-3-6~2012-09-11_08.49.57

I can see no upper and lower borders on any of the icons in main.icns on OSX 10.8.1, so as far I'm concerned, there is no problem with any of them. When I select the icon with Cmd-A, the selection handles show that the icon image extends all the way to the top and bottom borders.


Alex


Alex
Comment 13 Roman Eisele 2012-09-13 10:32:56 UTC
(In reply to comment #12)
> Testing this morning with 
> libreoffice-3-6~2012-09-11_08.49.57
> 
> I can see no upper and lower borders on any of the icons in main.icns on OSX
> 10.8.1, so as far I'm concerned, there is no problem with any of them. When I
> select the icon with Cmd-A, the selection handles show that the icon image
> extends all the way to the top and bottom borders.

Wow! I really begin tho think that I am crazy ... ;-)

To make sure that we are talking about exactly the same file and version:
The current master source file of the “main.icns” file is at

http://cgit.freedesktop.org/libreoffice/core/tree/sysui/desktop/icons/main.icns

If I download it and open it with Preview, I see all the things described above and visible on my screenshots (the 128x128px and 256x256px icons don’t use the complete image size, but show a big transparent border).

Can you please download that file, open it and test again the 128x128px and 256x256px icons?

Sorry for all the work this means for you :-)
Comment 14 Alex Thurgood 2012-09-13 13:02:43 UTC
(In reply to comment #13)

> 
> Can you please download that file, open it and test again the 128x128px and
> 256x256px icons?
> 


When I download that file and try and open it with Preview, I get an error message telling me it is damaged, and then the file refuses to open. I will check out the same file from my own git repo, after a new pull.


Alex
Comment 15 Alex Thurgood 2012-09-13 13:07:38 UTC
Confirming with regard to main.icns in my git repo. Icons 3 and 4 have an upper and lower border.

Alex
Comment 16 Roman Eisele 2012-09-13 14:22:45 UTC
@Alex:

Thank you very very much for confirming this issue! I’m sorry that it was so complicated -- I did not imagine that -- and it is just a very minor issue, of course. But I am glad that you could confirm it, so I know that I am not crazy ;-)

Roman
Comment 17 Roman Eisele 2012-09-13 14:51:18 UTC
@Nicholas Shanks,
@Caolán McNamara:

Hello Nicholas and Caolán,
thank you, Nicholas, very much for the “higher-resolution OpenDocument icons for MacOSX”, and you, Caolán, for committing them!

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0cb1b9685877f6aeaddf1088ae5008e38bade6f9

However, there is a little error in the new version of the “main.icns” file, which contains the LibreOffice application icon, and is located at 

http://cgit.freedesktop.org/libreoffice/core/tree/sysui/desktop/icons/main.icns

The 128x128px and 256x256px sizes are a bit defective now: while in all other sizes the grey page symbol is as big as possible, so that only at the left and at the right there is a small transparent margin, the new versions of the 128x128px and 256x256px sizes are too small, so that there is a wide transparent margin all around the grey page symbol. This is difficult to explain, so please take a look at the file or at my screenshots attached to this bug report.

The result of this error is that the LibreOffice application icon now looks “smaller” in the Dock (and probably elsewhere in the Mac OS Finder!) than before, and smaller than the icons of other applications. See my screenshot attached to this bug report.

While this is not a very important error, it should be rather easy to fix it, and therefore I ask you to please create a new, correct version of the “main.icns” file.

Thank you very much in advance!
Comment 18 Nicholas Shanks 2012-09-13 17:57:14 UTC
I can confirm this, and have been able to reproduce the cause.

When creating the icons, I dragged the PNG files of the appropriate size into IconComposer. Repeating this causes the scaling and transparent borders, whereas dragging the 32x32 (hand-drawn bitmap) or 512x512 PNGs (exported by myself from Inkscape and pngcrushed) does not. I suspect there is something in the PNG files of these sizes, like a canvas margin or offset (presumably generated by the SVG-to-PNG exporter that the 128 & 256px PNGs were created with), that IconComposer is using. When I copy the raw pixels and paste them into the IconComposer window, no scaling occurs. I will re-send a link to new images to the mailing list which fixes this issue.
Comment 19 Nicholas Shanks 2012-09-13 19:29:41 UTC
[Copy of email posted to mailing list:]

I suspected as soon as I saw the behaviour, the PNGs from which the icns file was generated specify a non-zero image offset (a.k.a. vitrual canvas, or page). See:
http://www.imagemagick.org/Usage/basics/#page

However that does not appear to be the case:

mars:~ nickshanks$ identify main.png 
main.png PNG 128x128 128x128+0+0 8-bit DirectClass 2.27KB 0.000u 0:00.019
mars:~ nickshanks$ identify main.png 
main.png PNG 256x256 256x256+0+0 8-bit DirectClass 4.38KB 0.000u 0:00.000

(note the +0+0 canvas offset)
As such I don't know what caused the borders to appear, but anyway, the file here fixes the issue:
http://web.nickshanks.com/libreoffice/revised-main-icon.tgz

Again, the file paths inside are relative to in the core/sysui/desktop/ directory, so extracting there will overwrite the old files. (And I gzipped it this time for all you gzip lovers out there ;-)

The package also contains revised 512x512 and 1024x1024 icons, because the originals were 2px and 4px too far left, respectively. When zooming the icon size up and down, there was a perceptible jump at the 256–257px boundary. I also pngcrushed them (with -brute).

Note of caution to anyone working with PNGs on Mac OS X: Pixelmator used an unexpected colour profile when opening an image which has no embedded profile (might be my monitor's calibration profile?). I had to use Acorn to move the pixels.
Comment 20 Roman Eisele 2012-09-14 06:08:42 UTC
@ Nicholas Shanks:

Thank you very much for you fast reaction and for fixing the .icns file!

(In reply to comment #19)
> As such I don't know what caused the borders to appear, but anyway, the file
> here fixes the issue:
> http://web.nickshanks.com/libreoffice/revised-main-icon.tgz

I wanted to do a quick test of the file, but I can’t download it -- error message: “The requested URL /libreoffice/revised-main-icon.tgz was not found on this server.” -- so is a typo somewhere in the file path?
Comment 21 Roman Eisele 2012-09-14 13:51:02 UTC
(In reply to comment #19)
> As such I don't know what caused the borders to appear, but anyway, the file
> here fixes the issue:
> http://web.nickshanks.com/libreoffice/revised-main-icon.tgz

Now the link works, and after a short look at the .icns file inside of the .tgs archive I would say that everything is correct now -- at lease all icon sizes now use the full image area, as appropriate, and look fine.

Thank you very much, Nicholas!
Comment 22 Not Assigned 2012-09-17 14:43:45 UTC
Nicholas Shanks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=00ec76a49d8caa2e367151683a77eefcc1ee75df

Resolves: fdo#54820 128x128px and 256x256px icons too small on MacOSX



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 23 Roman Eisele 2012-09-18 10:10:36 UTC
VERIFIED FIXED with current master build (LOdev 3.7.0.0.alpha0+, Build ID:
01e6335, Pull time: 2012-09-18 04:23:03) on Mac OS X 10.6.8 (Intel).
Application icon now looks fine in all sizes.

Thank you both again for fixing this!