gif image operation fix