Refactor egl/glx/image code to be more stylistically consistent