Comments (10)
3d94f11 deprecates SPNG_DECODE_USE_*
flags.
from libspng.
struct spng_bkgd.plte_index
is an uint16_t
, it should be uint8_t
.
from libspng.
Consider combining spng_ctx_new()
and spng_ctx_new2()
and changing the return value to int
.
from libspng.
Consider renaming spng_set_png_buffer/stream()
to something like spng_set_src_buffer/stream()
to allow for more consistent function names once encode support is added, functions for setting the output buffer/stream for the encoder would be named spng_set_dst_buffer/stream()
.
from libspng.
New types could be introduced as typedefs to spng_ctx
:
spng_dec
- decoderspng_enc
- encoder
To simplify the API and make things clearer:
spng_set_*()
functions would be changed to takespng_enc*
- Functions for context creation and setting of source/destination PNG can be merged:
int spng_new_buffer_decoder(spng_dec**, spng_alloc*, int flags, void *buf, size_t len);
int spng_new_stream_decoder(spng_dec**, spng_alloc*, int flags, spng_read_fn*, void *user);
int spng_new_stream_encoder(spng_enc**, spng_alloc*, int flags, spng_write_fn*, void *user);
These functions could also be added without introducing the typedefs, spng_new_buffer_decoder()
is more descriptive than spng_ctx_new()
+ spng_set_src_buffer()
.
from libspng.
spng_get_text()
and spng_get_splt()
should use regular int pointers for array counts and check for INT32_MAX
instead of checking for unsigned overflow when adding a new entry to its internal list, the list should also be assigned to a pointer instead of making the user allocate a struct array:
spng_get_text(spng_ctx*, struct spng_text **text, int *n_text);
struct spng_text
should also change to reflect the internal version.
from libspng.
Progressive encode/decode functions should probably not return SPNG_EOI
on the last row (#205).
from libspng.
struct spng_chunk
should have been removed from the header before the API was stabilized, this led to struct spng_unknown_chunk
as a workaround.
Consider renaming the latter to the former and shortening spng_set/get_unknown_chunks()
too.
from libspng.
struct spng_ihdr.color_type
is currently uint8_t
, enum spng_color_type
would be better.
from libspng.
Consider widening struct spng_offs.unit_specifier
and struct spng_phys.unit_specifier
to enums.
edit: struct spng_row_info.filter
and struct spng_ihdr.interlace_method
too
from libspng.
Related Issues (20)
- Support for Windows BMP HOT 1
- SPNG_FMT_PNG is big-endian even while little-endian system HOT 5
- TRUECOLOR vs RGB8 HOT 4
- spng_encode_image doesn't fail if a pixel index is bigger than spng_plte::n_entries HOT 2
- Add option to check palette indices
- Debian packaging HOT 14
- Clang: error: type '_Float32' (aka 'float') in generic association compatible with previously specified type 'float' HOT 1
- Decode RGB16 / G16 HOT 3
- accept a possible invalid png file HOT 2
- Compatibility with PNG images with zero-length EXIF chunk HOT 3
- Consider revising error handling for large chunks
- Simple error in libspng site HOT 1
- accept a possible problematic png image silently HOT 5
- Error linking libspng functions when compiling Mingw-w64 project HOT 4
- Example for spng_set_png_stream() HOT 1
- Indexed .PNGs don't seem to handle alpha channel correctly HOT 1
- Website basic usage example has wrong parameter order for spng_decode_image() HOT 1
- No subimage when creating an image from scratch HOT 1
- Missing check in function check_time HOT 1
- Feature request: ability to disable CMake install targets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libspng.