Rotate an image file as it exists within the DB?

Trying to accomplish a 90 degree rotation of a jpeg without a plugin - anyone know a way?