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

 
 

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

bug #33475: .icns loaded with NSImage

Submitted by:  Austin C <aklau>
Submitted on:  Sat 04 Jun 2011 10:16:09 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

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>
Project MemberIn charge of this item.
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>
Project MemberIn charge of this item.
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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by gcasa (Posted a comment)
  • -unavailable- added by aklau (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 07 Dec 2013 09:28:21 PM UTCFredKieferCategoryNone=>Gui/AppKit
      Item GroupNone=>Bug
    Mon 03 Oct 2011 08:49:49 PM UTCFredKieferStatusReady For Test=>Fixed
      Open/ClosedIn Test=>Closed
    Thu 16 Jun 2011 08:52:18 AM UTCFredKieferStatusNone=>Ready For Test
      Open/ClosedOpen=>In Test
    Sat 04 Jun 2011 11:27:39 PM UTCFredKieferAssigned toNone=>FredKiefer

    Back to the top


    Powered by Savane 3.1-cleanup1