lvandeve / lodepng

PNG encoder and decoder in C and C++.
zlib License
2.07k stars 422 forks source link

Minor issue about the type of array passed to LodePNG #38

Open MarcusJohnson91 opened 8 years ago

MarcusJohnson91 commented 8 years ago

It's like the most first world problem in the history of the universe, but it'd be cool if you'd change the input and output arrays from unsigned char to uint8_t. they're exactly the same underneath the covers, plus you're not using it as a char, but as an unsigned int.

Anyway, feel free to decline this request, because it doesn't really matter, it'd just be nice.

lvandeve commented 8 years ago

The library is made compatible with C90, which doesn't have uint8_t. But it should work if you pass it a uint8_t array since (on typical platforms) it's just a typedef of unsigned char. Does it work for you?

MarcusJohnson91 commented 8 years ago

I'm on OS X and Xcode gave me warnings, but Apple is known to define their types as darwin-specific types that are further defined as the regular types, so that's probably it.