New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCSwipeableFilterView with wrong contentMode and Video stretched on iPhone X #416
Comments
I had the same issue. I was using this in conjunction with GPUImage, and I found out that I had to pre-configure the camera's frame/resolutions size for the iPhone X, or else the filter view would stretch the image or video. |
I am facing the same issue with iPhone X. I have used SCFilterImageView. |
I've ended up changing the size of the view displaying the video content. I've put it in a 16:9 resolution and the background color was set to black. I tried a lot of things, even change de content mode of the internal classes, but without success. |
@gutiago so it was resolved? I think it has less to do with SCRecorder's contentMode but the content of the image or video asset itself |
Yes, I it worked! I mean, I think it's a good approach to solve this situation. If your app really needs to display the video on the entire screen on the X, I have no idea how to help. And also, if I'm not wrong, constraining the view to Safe Area, reduced the sensation of a stretch image. |
@HackShitUp |
Hi @gutiago Thanks |
For anyone still needing this, I managed to fixed the issue by cropping the image to the required rect in SCImageView.m - scaleAndResizeCIImage:forRect: verticalScale = horizontalScale;
}
- return [image imageByApplyingTransform:CGAffineTransformMakeScale(horizontalScale, verticalScale)];
+ image = [image imageByApplyingTransform:CGAffineTransformMakeScale(horizontalScale, verticalScale)];
+ rect.origin.x = CGRectGetMidX(image.extent) - CGRectGetMidX(rect);
+ rect.origin.y = CGRectGetMidY(image.extent) - CGRectGetMidY(rect);
+ return [image imageByCroppingToRect:rect];
}
- (void)drawRect:(CGRect)rect {
|
still it is stretching in the perivew |
So, I'm using SCSwipeableFilterView on my project, it works well on all devices, when using SCSwipeableFilterView.
But, when I run on a iPhone X, my video gets stretched. For some reason, it does not respect the content mode applied.
Does anyone know how to solve it?
The text was updated successfully, but these errors were encountered: