This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// An extension to provide conversion to and from HSL (hue, saturation, lightness) colors. | |
extension UIColor { | |
/// The HSL (hue, saturation, lightness) components of a color. | |
struct HSL: Hashable { | |
/// The hue component of the color, in the range [0, 360°]. | |
var hue: CGFloat | |
/// The saturation component of the color, in the range [0, 100%]. | |
var saturation: CGFloat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Change the opacity of a CIFilter. | |
*/ | |
func changeOpacity(to opacity: CGFloat, on filter: CIFilter, original image: UIImage) -> CIImage? { | |
guard let backgroundImage: CIImage = CIImage(image: image) else { fatalError() } | |
// The CIColorMatrix filter, will contain the requested filter and control its opacity | |
guard let overlayFilter: CIFilter = CIFilter(name: "CIColorMatrix") else { fatalError() } | |
let overlayRgba: [CGFloat] = [0, 0, 0, opacity] | |
let alphaVector: CIVector = CIVector(values: overlayRgba, count: 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mark Essel10-Aug-2015 02:41 PM | |
Summary: | |
The issue specifically arises when a user has iCloud photo backup enabled, and attempts to export a substantial video to the photo library (the longer the video the longer the delay, exponentially slower) | |
https://gist.github.com/victusfate/8969a70e82c00ae448a7 | |
Steps to Reproduce: | |
1. turn on icloud photo backup | |
2. run the attached code snippet in an app for a given videoURL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// GPUImageTextureInput+CIImage.h | |
// GPUImage | |
// | |
// Created by Sam Soffes on 3/4/14. | |
// Copyright (c) 2014 Sam Soffes. All rights reserved. | |
// | |
#import "GPUImageTextureInput.h" |