new version with encapsulated pixel frame parsing