DentonW / DevIL

Developer's Image Library (DevIL) is a cross-platform image library utilizing a simple syntax to load, save, convert, manipulate, filter, and display a variety of images with ease. It is highly portable and has been ported to several platforms.
http://openil.sourceforge.net/
GNU Lesser General Public License v2.1
446 stars 137 forks source link

Confusion over Bpp and Bpc #76

Open Geof23 opened 6 years ago

Geof23 commented 6 years ago

Hey Devs, I've noticed some inconsistency in the handling of ILimage members Bpc and Bpp.

For instance, after creating an ilImage(filename.exr), the image object had a Bpp of 16, where the file object was an RGBA float. Of course, this would be correct if Bpp meant 'bytes per pixel'. However, 'devil_internal_exports.h' indicates that this is actually the number of channels per pixel.

Perhaps this is an inconsistency between the cpp wrapper and the base c implementation. For instance, I added support for 'Blit' in the cpp, and found that it couldn't properly handle the above file. It doesn't seem to handle the float type properly

Anyway, I can provide a diff for the Blit func if you like.