Skip to content

the-swift-collective/libpng

Repository files navigation

LibPNG

Cross platform swift package for the libpng library.

Usage

To use libpng in swift, add libpng as a package dependency in your project's Package.swift file.
dependencies: [
  .package(url: "https://github.com/the-swift-collective/libpng.git", from: "1.6.45"),
]
Then, for any target you'd like, add the libpng product as a target dependency, a complete example.
// swift-tools-version: 5.8
import PackageDescription

let package = Package(
  name: "MyPackage",
  products: [
    .library(
      name: "MyLibrary",
      targets: ["MyLibrary"]
    ),
  ],
  dependencies: [
    .package(url: "https://github.com/the-swift-collective/libpng.git", from: "1.6.45")
  ],
  targets: [
    .target(
      name: "MyLibrary",
      dependencies: [
        /* add the libpng product as a library dependency. */
        .product(name: "LibPNG", package: "libpng"),
      ]
    ),
  ]
)


the swift collective - cross platform swift packages.
libpng is licensed under the terms of the PNG Reference Library version 2 license.

About

portable network graphics support for swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published