ObjectiveC helpers

NSStringToString

std::string imebra::NSStringToString(NSString *str)

Convert an NSString to a std::string accepted by imebra.

Return
a UTF-8 encoded std::string
Parameters
  • str: an NSString

stringToNSString

NSString *imebra::stringToNSString(const std::string &str)

Convert a UTF-8 encoded std::string to an NSString.

Return
a NSString
Parameters
  • str: a UTF-8 encoded std::string

getImebraImage

NSImage *imebra::getImebraImage(const imebra::Image &image, imebra::DrawBitmap &drawBitmap)

Generates a NSImage on OS-X or an UIImage on iOS from a 24bpp RGB data returned by imebra::DrawBitmap::getBitmap().

Return
a NSImage initialized with the 24bpp RGB data returned by imebra::DrawBitmap
Parameters