Video Editing

This commit is contained in:
Ilya Laktyushin
2020-05-23 13:26:53 +03:00
parent 29b23c767f
commit 7741978b7e
131 changed files with 3072 additions and 631 deletions

View File

@@ -110,6 +110,7 @@
pickerController.pallete = strongController.pallete;
}
pickerController.suggestionContext = strongController.suggestionContext;
pickerController.stickersContext = strongController.stickersContext;
pickerController.localMediaCacheEnabled = strongController.localMediaCacheEnabled;
pickerController.captionsEnabled = strongController.captionsEnabled;
pickerController.allowCaptionEntities = strongController.allowCaptionEntities;
@@ -149,6 +150,12 @@
self.pickerController.suggestionContext = suggestionContext;
}
- (void)setStickersContext:(id<TGPhotoPaintStickersContext>)stickersContext
{
_stickersContext = stickersContext;
self.pickerController.stickersContext = stickersContext;
}
- (void)setCaptionsEnabled:(bool)captionsEnabled
{
_captionsEnabled = captionsEnabled;
@@ -875,7 +882,11 @@
if ([adjustments cropAppliedForAvatar:false] || adjustments.hasPainting)
{
CGRect scaledCropRect = CGRectMake(adjustments.cropRect.origin.x * image.size.width / adjustments.originalSize.width, adjustments.cropRect.origin.y * image.size.height / adjustments.originalSize.height, adjustments.cropRect.size.width * image.size.width / adjustments.originalSize.width, adjustments.cropRect.size.height * image.size.height / adjustments.originalSize.height);
return TGPhotoEditorCrop(image, adjustments.paintingData.image, adjustments.cropOrientation, 0, scaledCropRect, adjustments.cropMirrored, targetSize, sourceSize, resize);
UIImage *paintingImage = adjustments.paintingData.stillImage;
if (paintingImage == nil) {
paintingImage = adjustments.paintingData.image;
}
return TGPhotoEditorCrop(image, paintingImage, adjustments.cropOrientation, 0, scaledCropRect, adjustments.cropMirrored, targetSize, sourceSize, resize);
}
return image;