Gin
Loading...
Searching...
No Matches
Functions
macOS Namespace Reference

macOS-specific image conversion utilities. More...

Functions

juce::Image nsImageToImage (NSImage *nsImage)
 Converts a macOS NSImage to a JUCE Image.
 
NSImageimageToNSImage (const juce::Image &image)
 Converts a JUCE Image to a macOS NSImage.
 

Detailed Description

macOS-specific image conversion utilities.

This namespace provides functions for converting between JUCE images and native macOS NSImage objects, allowing interoperability with macOS-specific APIs.

Function Documentation

◆ nsImageToImage()

juce::Image macOS::nsImageToImage ( NSImage nsImage)

Converts a macOS NSImage to a JUCE Image.

Useful when receiving images from macOS APIs (such as pasteboard, drag and drop, or system icons) and needing to use them in JUCE.

Parameters
nsImageThe NSImage to convert
Returns
A JUCE Image containing the same pixel data

◆ imageToNSImage()

NSImage * macOS::imageToNSImage ( const juce::Image &  image)

Converts a JUCE Image to a macOS NSImage.

Useful when passing images to macOS APIs that require NSImage objects.

Parameters
imageThe JUCE image to convert
Returns
An NSImage containing the same pixel data