ConvertTransform
public class ConvertTransform : Transform
Converts the image to a different format.
Matrix of supported conversions can be found here: https://cdn.filestackcontent.com/UPqbkTIETnGaQJa1nqnG?dl=true
-
Initializes a
ConvertTransformobject.Declaration
Swift
public init() -
Adds the
formatoption.Declaration
Swift
@discardableResult func format(_ value: TransformFiletype) -> SelfParameters
valueThe format to which you would like to convert the file.
-
Adds the
backgroundoption.Declaration
Swift
@discardableResult func background(_ value: UIColor) -> SelfParameters
valueSet a background color when converting transparent .png files into other file types.
-
Adds the
pageoption.Declaration
Swift
@discardableResult func page(_ value: Int) -> SelfParameters
valueIf you are converting a file that contains multiple pages such as a PDF or PowerPoint file, you can extract a specific page using the page parameter. Valid range:
1...99999 -
Adds the
densityoption.Declaration
Swift
@discardableResult func density(_ value: Int) -> SelfParameters
valueYou can adjust the density when converting documents like PowerPoint, PDF, AI and EPS files to image formats like JPG or PNG. Valid range:
1...500 -
Adds the
compressoption. Takes advantage of Filestack’s image compression which utilizes JPEGtran and OptiPNG.Declaration
Swift
@discardableResult func compress() -> Self -
Adds the
qualityoption.Declaration
Swift
@discardableResult func quality(_ value: Int) -> SelfParameters
valueYou can change the quality (and reduce the file size) of JPEG images by using the quality parameter. Valid range:
1...100 -
Adds the
qualityoption with value set to “input”. Used for JPG images if we want output file to have same quality as original one.Declaration
Swift
@discardableResult func preserveInputQuality() -> Self -
Adds the
stripoption. Remove embedded file metadata.Declaration
Swift
@discardableResult func strip() -> Self -
Adds the
colorspaceoption.Declaration
Swift
@discardableResult func colorSpace(_ value: TransformColorSpace) -> SelfParameters
valueAn
TransformColorSpacevalue. -
Adds the
secureoption. Applies to conversions of HTML and SVG sources only. When the secure parameter is set to true, the HTML or SVG file will be stripped of any insecure tags.Declaration
Swift
@discardableResult func secure() -> Self -
Adds the
docinfooption. Gives information about a document, such as the number of pages and the dimensions of the file. This information is delivered as a JSON object.Declaration
Swift
@discardableResult func docInfo() -> Self -
Adds the
pageFormatoption.Declaration
Swift
@discardableResult func pageFormat(_ value: TransformPageFormat) -> SelfParameters
valueAn
TransformPageFormatvalue. -
Adds the
pageOrientationoption.Declaration
Swift
@discardableResult func pageOrientation(_ value: TransformPageOrientation) -> SelfParameters
valueAn
TransformPageOrientationvalue.
View on GitHub
ConvertTransform Class Reference