Well, I wanted to explore Bill's idea of adding -auto-orient, and since it turns out that fetch_thumbnail does all the resizing, and it's easy to add the option there, then I thought that might work. But as I said, the lightbox image doesn't work and I'm not sure why. But rather than track that down, I think it's better to try what Bill said and rotate it if necessary before doing anything else. A couple years ago I was working on a mod that read and displayed EXIF data from upload files that had it, so I know there's a hook where you can work on the uploaded file before anything else is done to it. I've just been looking in to that and I believe newattachment_start will work. So it's just a matter of writing the code to exec the IM programs using the temp file name, convert it to a new temp file name, then replace the name in $_FILE. It would be nice to use the existing code in the IM class, but that would mean modifying the file.
In any case I think I'm pretty much there and it's just down to the details of implementing it.
|