|
| 1 | +# libplum |
| 2 | + |
| 3 | +This is a C library designed to read and write common image file formats, and handle the resulting image data. |
| 4 | + |
| 5 | +The main goal of the library is simplicity of use. |
| 6 | +File formats are automatically detected, freeing the programmer from the burder of knowing in advance which formats to |
| 7 | +support (or which one is currently being used by their users), and almost all format parameters are automatically |
| 8 | +chosen by the library when generating an image file. |
| 9 | +Reading and writing files (or data in memory) is done with a single function call and requires no setup. |
| 10 | +The library has no dependencies besides the standard ISO C17 library functions, and therefore can be easily included |
| 11 | +in any application. |
| 12 | + |
| 13 | +Please make sure to check the [documentation](docs/README.md) for further information. |
| 14 | + |
| 15 | +Everything in this repository is released to the public domain under [the Unlicense](LICENSE). |
| 16 | + |
| 17 | +## Building and using the library |
| 18 | + |
| 19 | +To build the source files for inclusion in other projects, use `make basefiles`; this simply requires common POSIX |
| 20 | +command-line tools (like a Bash shell). |
| 21 | +This will generate the `build/libplum.c` and `build/libplum.h` files. |
| 22 | +To build a binary for the library on top of the files mentioned above, use `make`; this requires a C17 compiler, and |
| 23 | +will generate the `build/libplum.so` file on top of the files mentioned above. |
| 24 | + |
| 25 | +To use the library, `#include "libplum.h"` from your code. |
| 26 | +You may compile `libplum.c` along the rest of your code (provided you're using a C17-conformant compiler in your |
| 27 | +project) or use the pre-built shared binary directly. |
| 28 | + |
| 29 | +Releases contain the `libplum.c` and `libplum.h` files generated above, ready for inclusion. |
| 30 | +Binaries are not included. |
| 31 | + |
| 32 | +## More information |
| 33 | + |
| 34 | +For further information, please check the [documentation](docs/README.md). |
| 35 | + |
| 36 | +(Note that the documentation is included within the source tree, instead of using the wiki features, so that any |
| 37 | +source archive will contain documentation suitable for that version of the library. |
| 38 | +If you're using an older version of the library, please refer to that documentation if needed.) |
| 39 | + |
| 40 | +## FAQ |
| 41 | + |
| 42 | +**Q:** Does this library support the <insert format here> image format? |
| 43 | + |
| 44 | +**A:** For the list of supported file formats, check [the relevant documentation page](docs/formats.md). |
| 45 | + |
| 46 | +**Q:** Will <currently unsupported format> be supported? |
| 47 | + |
| 48 | +**A:** If it has a public and established standard I can freely implement (i.e., without requiring a license), feel |
| 49 | +free to link me to it and I may implement it. |
| 50 | +Note that only true raster image formats are within scope: vector images (like SVG), containers (like ICO), or formats |
| 51 | +that contain non-image data (like video files) will not be supported. |
| 52 | + |
| 53 | +**Q:** What does the name "libplum" mean? |
| 54 | + |
| 55 | +**A:** Nothing. |
| 56 | +I was looking for a short word that could be easily pronounced to be used as a prefix for function and macro names, |
| 57 | +and "plum" was the first one that came to mind. |
| 58 | +It is intentionally meaningless and it is not an acronym or an abbreviation. |
0 commit comments