CompressTransform
public class CompressTransform : Transform
Utilizes mozjpeg to offer improved compression for JPGS over the algorithm used for output=compress:true.
It will not attempt to re-compress a previously compressed image.
For the best results, compress should be the last task in your transformation chain.
Important
Works only with PNG and JPG files.-
Initializes a
CompressTransformobject.Declaration
Swift
public init()
-
Adds the
metadataoption.Declaration
Swift
@discardableResult func metadata(_ value: Bool) -> SelfParameters
valueSets if we want to keep metadata while compressing.
View on GitHub
CompressTransform Class Reference