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

Group
 
 

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

Submitter:  Yavor Doganov <yavor>
Submitted:  Sun 10 Feb 2019 10:13:38 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Ready For Test
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  In Test
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 27 Feb 2019 07:07:43 AM UTC, comment #5: 

As always, your patch is much simpler, more efficient and it works equally well.  Thanks!

Yavor Doganov <yavor>
Tue 26 Feb 2019 08:37:57 PM UTC, comment #4: 

I applied a very similar patch to the one you provided last. Please give it a try.

Fred Kiefer <FredKiefer>
Group Member
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>
Group Member
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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-26 FredKiefer StatusNone Ready For Test
        Open/ClosedOpen In Test
    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.13-4448.
    Corresponding source code