Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/valeriyvan/swift-netpbm
libnetpbm library as Swift package. libnetpbm is a C programming library for reading, writing, and manipulating Netpbm images.
https://github.com/valeriyvan/swift-netpbm
image-manipulation image-processing
Last synced: 4 days ago
JSON representation
libnetpbm library as Swift package. libnetpbm is a C programming library for reading, writing, and manipulating Netpbm images.
- Host: GitHub
- URL: https://github.com/valeriyvan/swift-netpbm
- Owner: valeriyvan
- License: mit
- Created: 2024-05-23T05:46:56.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-02T04:45:07.000Z (3 months ago)
- Last Synced: 2024-08-02T05:45:22.065Z (3 months ago)
- Topics: image-manipulation, image-processing
- Language: C
- Homepage:
- Size: 408 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# swift-netpbm
This Swift package vends C `libnetpbm` library for image manipulation as `libnetpbm` product. While the `libnetpbm` from the package is fully functional, it is not recommended for direct use in Swift due to compatibility issues. The original `libnetpbm` library is written in a way that does not integrate well with Swift. If there is an error while parsing an image file or during input-output operations, the library may call `exit` or use `longjmp`, depending on its initialization. An `exit` call will cause the app to terminate abruptly, resembling a crash. Utilizing [`longjmp` in Swift results in undefined behavior](https://forums.swift.org/t/on-the-road-to-swift-6/32862/146?page=8).
Porting C `libnetpbm` into Swift is work in progress and not yet ready to be used.
Reference to original [Netpbm homepage](https://netpbm.sourceforge.net/doc/).
[Netpbm in Wikipedia](https://en.wikipedia.org/wiki/Netpbm).
[Introduction into libnetpbm](https://netpbm.sourceforge.net/doc/libnetpbm.html).
[Libnetpbm User's Guide](https://netpbm.sourceforge.net/doc/libnetpbm_ug.html) which covers PAM functions recommended to be used.
References for legacy interfaces:
* [pbm Functions](https://netpbm.sourceforge.net/doc/libpbm.html);
* [pgm Functions](https://netpbm.sourceforge.net/doc/libpgm.html);
* [ppm Functions](https://netpbm.sourceforge.net/doc/libppm.html);
* [pnm Functions](https://netpbm.sourceforge.net/doc/libpnm.html).