For some reason, opening up some PNG files using ImageBuffer and ImageIO does not work. Here\'s some code I am using that works fine for resizing/cropping JPGs:
A workaround solution would be to convert the file to jpeg first, and then process it. The type 0 bug seems to mostly affect PNG images.