bugGNUstep - Bugs: bug #55690, Black images when linked with...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #55690: Black images when linked with libicns; smalles icon is always loaded

Submitted by:  Yavor Doganov <yavor>
Submitted on:  Sun 10 Feb 2019 10:13:38 PM UTC  
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  None
Privacy:  Public Assigned to:  Fred Kiefer <FredKiefer>
Open/Closed:  Open

Wed 13 Feb 2019 03:45:58 PM UTC, comment #3:

I extracted the images with icns2png and you were right that these are 1 bit images.

Attaching a new patch; tested with and without libicns, with TalkSoup, TextEdit (which lacks 48x48 icon) and Lynkeos (which loads .icns images for the app icon and also some other toolbar icons).

(file #46247)

Yavor Doganov <yavor>
Tue 12 Feb 2019 10:16:21 PM UTC, comment #2:

The icons are completely black -- they have the shape (contour) of the image but are filled entirely in black colour. There is no white colour at all so one has to use her imagination to figure out what that thing is.

But you are probably right that these are the 1 bit images. I'll try to rework the patch so that all representations are available (as was your intention when you implemented this method).

Yavor Doganov <yavor>
Tue 12 Feb 2019 09:54:26 PM UTC, comment #1:

Hi Yavor,

I do not quite understand the first issue. When you say that the image is black do you mean that loading the icon displays a black and white image? This is of course true if the first icon in the file is a 1 bit image. If this is the whole issue, it would be sufficient to better sort the images when reading them, so the ones with 8 bit colours come first.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Sun 10 Feb 2019 10:13:38 PM UTC, original submission:

With libicns/0.8.1, all images derived from .icns files are black. This happens because icns_get_image32_with_mask_from_family from libicns is able to handle more formats unlike the implementation in NSBitmapImageRep+ICNS.m which caters only for the 32-bit format. IOW, when loading TalkSoup.icns, the array contains 4 elements with the built-in implementation but 7 elements when linked with external libicns.

Another issue (regardless of the libicns implementation used) is that always the smallest icon is loaded as the app icon; it happens to be the first in the array as the .icns file is processed sequentially. I guess this is because the first one is tried and it passes as "best representation"... However it looks really ugly for apps that use .icns files for the app icon (TalkSoup, TextEdit, Lynkeos, FreeCell).

Attached is a patch that solves both of these problems, albeit in a clumsy way.

Yavor Doganov <yavor>

 

Attached Files
file #46247:  55690.patch added by yavor (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by yavor (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-13 yavor Attached File- => Added 55690.patch, #46247
    2019-02-12 FredKiefer Assigned toNone => FredKiefer
    2019-02-10 yavor Attached File- => Added 0001-Fix-image-extraction-with-libicns-place-48x48-icon-a.patch, #46231

    Back to the top


    Powered by Savane 3.4