Hey TIm,
Ok this is the step by step process of what I’m doing.
-
Using an UIImagePickerController, I take a picture using the iPhone camera in portrait mode (just holding the iPhone in the default position).
-
Step 1 triggers the didFinishPickingMediaWithInfo:(NSDictionary*)info delegate method. The info dictionary contains the following data:
{
UIImagePickerControllerMediaMetadata = {
DPIHeight = 72;
DPIWidth = 72;
Orientation = 6;
"{Exif}" = {
ColorSpace = 1;
DateTimeDigitized = "2011:05:05 10:25:36";
DateTimeOriginal = "2011:05:05 10:25:36";
PixelXDimension = 1536;
PixelYDimension = 2048;
};
"{TIFF}" = {
DateTime = "2011:05:05 10:25:36";
Make = Apple;
Model = "iPhone 3GS";
Software = "4.3.3";
XResolution = 72;
YResolution = 72;
};
};
UIImagePickerControllerMediaType = "public.image";
UIImagePickerControllerOriginalImage = "<UIImage: 0x455aff0>";
}
Notice the Orientation value, which is 6 => Portrait.
- I create a
TransloaditRequest object, and add the picked file info like so: [transload addPickedFile:info]. The template I use does the following:
{ "steps": {
"small": {
"robot": "/image/resize",
"use": ":original",
"width": 190,
"height": 256
},
"export": {
"robot": "/s3/store",
"use": "small",
"key": "...",
"secret": "...",
"bucket": "...",
"path": "${previous_step.name}.jpg"
}
} }
- When the request finishes and all is done, the image stored in our S3 bucket is in landscape (left) orientation.
Is there a way I can manipulate the image before adding it to the TransloaditRequest object?
Thanks for your help.