bugGNUstep - Bugs: bug #33475, .icns loaded with NSImage

Group
 
 

bug #33475: .icns loaded with NSImage

Submitter:  Austin C <aklau>
Submitted:  Sat 04 Jun 2011 10:16:09 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 16 Jun 2011 08:52:18 AM UTC, comment #3: 

I think this problem should be resolved by Eric's recent patches. Could you please confirm this?

Fred Kiefer <FredKiefer>
Group Member
Sat 04 Jun 2011 11:27:39 PM UTC, comment #2: 

Which version of GNUstep gui are you using?

Up until and including the last release we only used one icon from an icns file. I changed the code a few weeks ago to load all available icons (or at least the formats that we implement). After that the icon used was somewhat arbitrary. Wolfgang Lux then changed the code in NSImage that selects the representation to use to take one whose size matches exactly the size to draw. This may not be the perfect solution in your case. Most likely there we should choose the smallest representation that is bigger or equal to the requested size. Is this what you are looking for? If so, it should be easy to adopt the code in [NSImage -bestRepresentationForDevice:].
We could of course also use the biggest size all the times, but this may not yield the best result, as we have'll to scale down the image.

Fred Kiefer <FredKiefer>
Group Member
Sat 04 Jun 2011 10:27:00 PM UTC, comment #1: 

Since we aren't always the creators of the ICNS files, for example with applications which are ported from Mac OS X.

What would make better sense is to have the implementation select the version which is appropriate for the size which needs to be displayed. 

Barring that, we could make the implementation pull the largest instead of the smallest since the largest can always be scaled down, even if it doesn't look so hot when that's done.   

GC

Gregory John Casamento <gcasa>
Group administrator
Sat 04 Jun 2011 10:16:09 PM UTC, original submission:  

(icns) Icons loaded with NSImage default to the smallest representation in the ICNS file instead of the largest. Since the smallest representation is used by default, in programs like GWorskapce, if one uses a .icns file the smallest icon representation is stretched to fill the icon space resulting in a nice blurry icon.

Workaround: Build the .icns file with out smaller representations. This has the effect of making the largest become default and scaling to look better, but lacks niceness of having a finely designed representation for the size.

Austin C <aklau>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 gcasa (Posted a comment)
  • -email is unavailable- added by aklau (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-12-07 FredKiefer CategoryNone Gui/AppKit
        Item GroupNone Bug
    2011-10-03 FredKiefer StatusReady For Test Fixed
        Open/ClosedIn Test Closed
    2011-06-16 FredKiefer StatusNone Ready For Test
        Open/ClosedOpen In Test
    2011-06-04 FredKiefer Assigned toNone FredKiefer

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code