Lossless JPEG transformations have some limitations (for example, you can crop only from the beginning of a JPEG macroblock), but they do not need to re-encode the image and have the big advantage to preserve the original quality. There are already several tools to do that, but none of them work in batch mode.