Skip to content

Commit

Permalink
Merge pull request #2 from vdhamer/main
Browse files Browse the repository at this point in the history
Broken link to Apple documentation
  • Loading branch information
dagronf authored Nov 3, 2024
2 parents 42ace24 + 94c80e8 commit fd33800
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ let image = CGImage/UIImage/NSImage
let pngData = try image.representation.png(scale: 2)

// Generate a JPG representation at 3x
let jpegData = try image.representation.jpeg(scale: 3, compression: 0.65, excludeGPSData: true))
let jpegData = try image.representation.jpeg(scale: 3, compression: 0.65, excludeGPSData: true)

// Generate a PDF representation
let pdfData = try image.representation.pdf(size: CGSize(width: 300, height: 300))
Expand Down
6 changes: 3 additions & 3 deletions Sources/SwiftImageReadWrite/CGImage/CGImage+export.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public extension CGImage {
/// Return the image data in the required format
/// - Parameters:
/// - type: The format type to export (with options)
/// - otherOptions: Other options as defined in [documentation](https://developer.apple.com/documentation/imageio/cgimagedestination/destination_properties)
/// - otherOptions: Other options as defined in [documentation](https://developer.apple.com/documentation/imageio/cgimagedestination)
/// - Returns: The formatted data, or nil on error
func imageData(for type: ImageExportType, otherOptions: [String: Any]? = nil) throws -> Data {
switch type {
Expand Down Expand Up @@ -210,7 +210,7 @@ public extension CGImage {
/// - scale: The image's scale value (for retina-type images eg. @2x == 2)
/// - compression: The compression level to apply (clamped to 0 ... 1)
/// - excludeGPSData: Strip any gps data
/// - otherOptions: Other options as defined in [documentation](https://developer.apple.com/documentation/imageio/cgimagedestination/destination_properties)
/// - otherOptions: Other options as defined in [documentation](https://developer.apple.com/documentation/imageio/cgimagedestination)
/// - Returns: image data
public func rawImageData(
uniformTypeIdentifier: String,
Expand Down Expand Up @@ -255,7 +255,7 @@ extension CGImage {
/// - dpi: The image's dpi
/// - compression: The compression level to apply (0...1)
/// - excludeGPSData: If true, strips any GPS information from the output
/// - otherOptions: Other options as defined in [documentation](https://developer.apple.com/documentation/imageio/cgimagedestination/destination_properties)
/// - otherOptions: Other options as defined in [documentation](https://developer.apple.com/documentation/imageio/cgimagedestination)
/// - Returns: image data
func dataRepresentation(
uniformTypeIdentifier: CFString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public extension PlatformImage {
/// - scale: The image's scale value (for retina-type images eg. @2x == 2)
/// - compression: The compression level to apply (clamped to 0 ... 1)
/// - excludeGPSData: Strip any gps data
/// - otherOptions: Other options as defined in [documentation](https://developer.apple.com/documentation/imageio/cgimagedestination/destination_properties)
/// - otherOptions: Other options as defined in [documentation](https://developer.apple.com/documentation/imageio/cgimagedestination)
/// - Returns: image data
@inlinable public func rawImageData(
uniformTypeIdentifier: String,
Expand Down

0 comments on commit fd33800

Please sign in to comment.