What is the fastest way to rotate a jpg image file?

admin

Administrator
Staff member
I am working on some batch routines to manage large libraries of jpg files. I have a nice routine that will quickly downsize 4mb+ files down to 40kb+. Using <a href="http://delphihaven.wordpress.com/20...age-metadata-readingwriting-library-ccr-exif/" rel="nofollow">CCR.Exif</a>, I can determine if an image needs to be rotated. My problem is that I can't find any code to rotate the image before I save it. I really need to be able to do this without incurring the overhead of bringing the image to screen.

I'm using the built-in jpeg.pas; I found another library by Gabriel Corneanu at <a href="http://cc.embarcadero.com/Item/19723" rel="nofollow">CodeCentral</a>, but it hasn't been updated for DXE2. All I need to do is a 90&deg; rotation.

Any help will be greatly appreciated!