You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-ios/SessionUtilitiesKit/Media/ImageFormat.swift

25 lines
521 B
Swift

// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
import Foundation
public enum ImageFormat {
case unknown
case png
case gif
case tiff
case jpeg
case bmp
case webp
public var fileExtension: String {
switch self {
case .jpeg, .unknown: return "jpg"
case .png: return "png"
case .gif: return "gif"
case .tiff: return "tiff"
case .bmp: return "bmp"
case .webp: return "webp"
}
}
}