home.social

#nsimage — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #nsimage, aggregated by home.social.

  1. I want to reproduce the coloring of the menu bar on the #Mac.

    So it seems I need to generate an image where each #pixel-column is the averaged color of that column's pixels (original image being the #desktopBackground).

    I thought I'd just create an #NSImage of height 1, draw the desktop picture into it, squishing it vertically. But of course on Retina I get 2 pixels for 1 point.

    Anyone remember how to create (and draw into!) an NSImage of height 1px?

    #swift #swiftlang #cocoa #appkit