Hi, I've been using vil to load and manipulate .png files saved from a LabView program that uses the IMAQ camera controls attached to a 12-bit CCD. The .pngs saved by this are a little wierd - they have variable bit depth depending on the dynamic range of the image and so use the 'SignificantBits' part of the png header. They are wierd enough that Matlab loads them incorrectly, and we had to write our own wrapper code around the Matlab load functions. Until today vil did not seem to have a problem with them, but the following assert fails when loading the latest round of images I captured with the LabView program: In vil_image_view.txx, line 76: assert(mem_chunk->size() >= n_planes*n_i*n_j*sizeof(T)); When I debug this, mem_chunk->size is equal to n_plane*n_i*n_j. Examining the 'this' pointer indicates that the pixel_format_ is VIL_PIXEL_FORMAT_BYTE. However some further digging indicates that sizeof(T) returns 2, hence the failed assert. Further examination of the pngs in Matlab indicates that they are only 7 bit pngs. Usually the camera gives us back more than 8 significant bits but this set of images are very dark. Does anyone with more experience of vil and the png file format have an idea as to what is going on? For the record, I am loading the files with: vil_image_view image = vil_convert_cast(double(), vil_load(fileName.c_str())) and the assert fails within vil_load. I am happy to send a suspect png file to anyone who can help if they want to replicate exactly my situation. Thanks in advance, Toby Wood