Does anyone know how to read and write to a .jpg image header?

Thanks in advance.