| 123456789101112131415161718192021222324252627282930 |
- /* public domain Simple, Minimalistic JPEG writer - http://jonolick.com
- *
- * Quick Notes:
- * Based on a javascript jpeg writer
- * JPEG baseline (no JPEG progressive)
- * Supports 1, 3 or 4 component input. (luminance, RGB or RGBX)
- *
- * Latest revisions:
- * 1.52 (2012-22-11) Added support for specifying Luminance, RGB, or RGBA via comp(onents) argument (1, 3 and 4 respectively).
- * 1.51 (2012-19-11) Fixed some warnings
- * 1.50 (2012-18-11) MT safe. Simplified. Optimized. Reduced memory requirements. Zero allocations. No namespace polution. Approx 340 lines code.
- * 1.10 (2012-16-11) compile fixes, added docs,
- * changed from .h to .cpp (simpler to bootstrap), etc
- * 1.00 (2012-02-02) initial release
- *
- * Basic usage:
- * char *foo = new char[128*128*4]; // 4 component. RGBX format, where X is unused
- * jo_write_jpg("foo.jpg", foo, 128, 128, 4, 90); // comp can be 1, 3, or 4. Lum, RGB, or RGBX respectively.
- *
- * */
- // Modified by Yao Wei Tjong for Urho3D
- #ifndef JO_INCLUDE_JPEG_H
- #define JO_INCLUDE_JPEG_H
- // Returns false on failure
- bool jo_write_jpg(const char *filename, const void *data, int width, int height, int comp, int quality);
- #endif // JO_INCLUDE_JPEG_H
|