• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Strange behaviour when showing NSToolbarItems' images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange behaviour when showing NSToolbarItems' images


  • Subject: Strange behaviour when showing NSToolbarItems' images
  • From: Matt Gemmell <email@hidden>
  • Date: Sun, 6 Oct 2002 21:19:26 +0100

Hi folks,

I'm experiencing some odd behaviour with an NSToolbar. Functionally, it's fine - the problem is with the images for some of the items. All the images are TIFFs stored in the app's bundle, and read in with +[NSImage imageNamed:].

They all show up, but some of them show up hideously blurry, almost as if they've been sized up considerably. All of the TIFFs are 32x32 pixels, and all of them display properly in Preview, Photoshop, GraphicConverter, the Finder's column view, and so on. Only when shown in an NSToolbar do things go funny.

There's one image which just never shows properly; it's always extremely blurry, as if having been sized up from smaller dimensions. There are another couple of images which display fine if, when the app launches, the toolbar is set to normal size. They remain fine if you subsequently set the toolbar to use small icons. However, if you launch the app with the toolbar set to use small icons (this toolbar automatically saves its state, by the way), then the image is fine at small size, but when you disable small icons you get a fuzzy larger size.

I've tried explicitly using -[NSImage setSize:NSMakeSize(32, 32)] on each image as I assign it to an NSToolbarItem, but with no change. I've tried recreating the images (by going back into Photoshop, opening the PSDs, and re-saving as TIFF), but still the problem persists for a few of the images. I even had one image which showed the problem, but when I went into Photoshop, moved it up by one pixel then back down by one pixel, and re-saved as TIFF, the problem disappeared! I've also tried running the images through tiffutil, with no success. No console messages are generated at any time during all this.

I guess I'm just hoping for someone to say there's either a known bug with NSToolbar or NSImage, or perhaps to tell me I'm doing something wrong in Photoshop. All the TIFFs are exported with no compression, Macintosh format, no layers, with transparency. Any thoughts?

Best,
-Matt

--
Matt Gemmell
Scotland Software
http://www.scotlandsoftware.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: dna.icns app icon minor bug
  • Next by Date: resizing action cells or clicking on imagecells inmatrix
  • Previous by thread: dna.icns app icon minor bug
  • Next by thread: Re: Strange behaviour when showing NSToolbarItems' images
  • Index(es):
    • Date
    • Thread