Finish port and fix pointer deref bug in char_for_subimage
add screenshot