Skip to content

Commit

Permalink
error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmartin8a committed Nov 10, 2023
1 parent d91e106 commit a7e50dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ + (MLKVisionImage *)visionImageFromData:(NSDictionary *)imageData {
NSString *imageType = imageData[@"type"];
if ([@"file" isEqualToString:imageType]) {
int rotation = [imageData[@"metadata"][@"rotation"] intValue];
int CameraLensDirection = [imageData[@"metadata"][@"camera_lens_direction"] intValue];
int cameraLensDirection = [imageData[@"metadata"][@"camera_lens_direction"] intValue];
UIImageOrientation imageOrientation = [self imageOrientationFromRotation:rotation cameraLensDirection:cameraLensDirection];
MLKVisionImage *image = [self filePathToVisionImage:imageData[@"path"]];
image.orientation = imageOrientation;
return image;
} else if ([@"bytes" isEqualToString:imageType]) {
int rotation = [imageData[@"metadata"][@"rotation"] intValue];
int lensDirection = [imageData[@"metadata"][@"camera_lens_direction"] intValue];
UIImageOrientation imageOrientation = [self imageOrientationFromRotation:rotation cameraLensDirection:cmaeraLensDirection];
int cameraLensDirection = [imageData[@"metadata"][@"camera_lens_direction"] intValue];
UIImageOrientation imageOrientation = [self imageOrientationFromRotation:rotation cameraLensDirection:cameraLensDirection];
MLKVisionImage *image = [self bytesToVisionImage:imageData];
image.orientation = imageOrientation;
return image;
Expand Down
2 changes: 1 addition & 1 deletion packages/google_mlkit_commons/lib/src/input_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class InputImageMetadata {
final int bytesPerRow;

// Camera lens direction.
final InputImageLensDirection cameraLensDirection;
final InputImageCameraLensDirection cameraLensDirection;

/// Constructor to create an instance of [InputImageMetadata].
InputImageMetadata({
Expand Down

0 comments on commit a7e50dc

Please sign in to comment.