Fixed: using SDL function for pixel format processing