Skip to main content
2 votes
0 answers
97 views

I have regular NSImage from iPhone and the drawing get's extremely choppy during window resize (especially at small window sizes below 100px). When the window size is large there is no problem with ...
Marek H's user avatar
  • 5,732
0 votes
1 answer
34 views

I am showing a menu bar button for my app: let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) if let button = statusItem.button, let img = NSImage(named: "...
sudoExclamationExclamation's user avatar
0 votes
1 answer
150 views

When one copies a file in Finder, the pasteboard contains a 'icns' type with the various icon descriptions of the copied item(s). I need to accomplish the same effect in my code, i.e. generate the ...
Thomas Tempelmann's user avatar
-1 votes
1 answer
96 views

I'm creating an app which requires the user to upload image files to the app. In the app I want to obtain its info (dimensions, ecc.) and show it. Here is what I tried: var body: some View { ...
Lorenzo Zorri's user avatar
0 votes
0 answers
57 views

I have an NSView with NSImage instances as subviews that all show up correctly on the screen. I want to save them to a PDF file but the subviews are not included. The routine works well and also saves ...
Till's user avatar
  • 1
1 vote
0 answers
125 views

I am trying to use the new -[NSOpenPanel setAllowedContentTypes:] and looking for equivalent of -[NSOpenPanel setAllowedFileTypes:[NSImage imageTypes]]. Is this equivalent: openPanel....
Marek H's user avatar
  • 5,732
0 votes
1 answer
57 views

I'm having an issue where when my asset catalog have more than 2 images (all have @1x @2x and @3x), my NSImage in my NSImageView cannot be clicked. Does anyone know why this happens? Thanks in advance!...
Christopher Nathanael Tessy's user avatar
2 votes
2 answers
3k views

I'm new to swift concurrency, I noticed that my code freezes UI when trying to initialize NSImage, so I decided to do it on the global thread like this: func chooseImage() { Task { @MainActor in ...
flex_'s user avatar
  • 733
0 votes
0 answers
54 views

I'm trying to build an macos utility to help me center the content of the image and not sure how I would achieve such. For example let say that I have an image as below: As you can see there's more ...
jo1087's user avatar
  • 43
1 vote
0 answers
91 views

I have 10 bit image file (HEIC, AVIF) loaded using NSImage. When attempting to resize using CGContext I get following message multiple times This method should not be called on the main thread as it ...
Marek H's user avatar
  • 5,732
2 votes
1 answer
91 views

I have a large image and a smaller image, both in Data type which I transformed into NSImage. I want to put the smaller image on top of the large image, top-left aligned, in a new single NSImage. ...
J. Doe's user avatar
  • 13.6k
2 votes
0 answers
151 views

I am currently experiencing strange behavior when determining icons for files. When I determine icons using let icon = NSWorkspace.shared.icon(forFile: path) it generally works fine. However, for ...
gkoeder's user avatar
  • 91
0 votes
1 answer
76 views

Developing apps for iOS, it is simple to extract pixels from UIImage, manipulate them, then reconstruct an UIImage from them, example: csr = CGColorSpaceCreateDeviceRGB(); ctx = CGBitmapContextCreate(...
Luigi Fonti's user avatar
0 votes
1 answer
364 views

I have an NSView whose layer has various sublayers. Its needsDisplay property is set to YES when the app changes its effective appearance, which ends up calling: -(void)updateLayer { // this is ...
jeanlain's user avatar
  • 475
1 vote
1 answer
415 views

I have a command-line Swift script that takes a series of images of close to the same pixel dimensions and creates a PDF from them. Part of what this script does is normalize the images so that each ...
Jerry Stratton's user avatar

15 30 50 per page
1
2 3 4 5
46