895f3ec889
* fix: Fix multi-Thread access on Java * fix: Thread-lock access on iOS as well * whoops add missing header impl * Update Podfile.lock * fix: Don't use `CFGetRetainCount` * fix: Lock access on iOS as well * C++ format * More detailed error * chore: Move getters into `Frame` * Format c++ * Use enum `orientation` again * format * fix: Synchronize `isValid` on Java * Also log pixelformat * feat: Use Java enums in C++ * Format C++
40 lines
939 B
Objective-C
40 lines
939 B
Objective-C
//
|
|
// UIImageOrientation+descriptor.h
|
|
// VisionCamera
|
|
//
|
|
// Created by Marc Rousavy on 29.12.23.
|
|
// Copyright © 2023 mrousavy. All rights reserved.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import <UIKit/UIImage.h>
|
|
|
|
@interface NSString (UIImageOrientationJSDescriptor)
|
|
|
|
+ (NSString*)stringWithParsed:(UIImageOrientation)orientation;
|
|
|
|
@end
|
|
|
|
@implementation NSString (UIImageOrientationJSDescriptor)
|
|
|
|
+ (NSString*)stringWithParsed:(UIImageOrientation)orientation {
|
|
switch (orientation) {
|
|
case UIImageOrientationUp:
|
|
case UIImageOrientationUpMirrored:
|
|
return @"portrait";
|
|
case UIImageOrientationDown:
|
|
case UIImageOrientationDownMirrored:
|
|
return @"portrait-upside-down";
|
|
case UIImageOrientationLeft:
|
|
case UIImageOrientationLeftMirrored:
|
|
return @"landscape-left";
|
|
case UIImageOrientationRight:
|
|
case UIImageOrientationRightMirrored:
|
|
return @"landscape-right";
|
|
}
|
|
}
|
|
|
|
@end
|