I have the following code in my GMImagePickerController in FinishedPicking Event.
picker.FinishedPickingAssets += (s, args) =>
{
PHImageManager imageManager = new PHImageManager();
PHImageRequestOptions imageOptions = new PHImageRequestOptions();
imageOptions.DeliveryMode = PHImageRequestOptionsDeliveryMode.HighQualityFormat;
imageOptions.ResizeMode = PHImageRequestOptionsResizeMode.Exact;
foreach (var asset in args.Assets)
{
imageManager.RequestImageForAsset(asset,
new CGSize(asset.PixelWidth,asset.PixelHeight),
PHImageContentMode.Default,
imageOptions,
(image1, info) =>
{
if(count<1)
{
CommonFunction.AttachPhotoiOS(image1, eventRecordID, cp, "NormalImage");
count++;
}
//CallCommonFunctionAttachPhotoiOS(image1, eventRecordID);
});
break;
}
};
As you can see I have already set the CGSize to the asset width and height, but still, when I debug and mouse over the image1 which is the retrieved image, the width and height is always 90 x 120 but not the original size of the asset. I have tried many ways and many images, the width and height seems like fixed forever. Which part has been done wrong? How can I get the original size of the image from it?