Of course, this screws things up when you're trying to actually decode the images:
libpng warning: Image width is zero in IHDR
libpng warning: Image height is zero in IHDR
libpng error: Invalid IHDR data
xpk: couldn't write PNG!: Error
So, what to do?
Maybe the 0x0 dimensions has a certain significance -- i.e., perhaps it implies something that we should be paying attention to.
Or maybe it's just something we're supposed to ignore, and so we need to skip over it.
Some XPK files -- exclusively those which represent journal entry fonts, apparently -- claim to have sub-images which are of dimensions 0x0.
Of course, this screws things up when you're trying to actually decode the images:
So, what to do?