I am using the following gimp script to rotate all images in a folder by 180° (the script is saved under ~/.gimp-2.8/scripts/batch-rotate.scm
)
(define (batch-rotate pattern rotate-type)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(gimp-image-rotate image rotate-type)
(gimp-file-save RUN-NONINTERACTIVE
image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))
I am calling the script like this:
gimp -i -b "(batch-rotate \"*.JPG\" 1)" -b '(gimp-quit 0)'
And I get the following error:
While parsing XMP metadata:
Error on line 85 char 1: End of element <exif:Flash> not expected in this context
While parsing XMP metadata:
Error on line 99 char 1: End of element <exif:Flash> not expected in this context
Metadata parasite seems to be corrupt
While parsing XMP metadata:
Error on line 85 char 1: End of element <exif:Flash> not expected in this context
** (file-jpeg:29145): WARNING **: JPEG - unable to decode XMP metadata packet
While parsing XMP metadata:
Error on line 85 char 1: End of element <exif:Flash> not expected in this context
While parsing XMP metadata:
Error on line 99 char 1: End of element <exif:Flash> not expected in this context
Metadata parasite seems to be corrupt
While parsing XMP metadata:
Error on line 85 char 1: End of element <exif:Flash> not expected in this context
** (file-jpeg:29149): WARNING **: JPEG - unable to decode XMP metadata packet
JPEG image-Warning: Premature end of JPEG file
While parsing XMP metadata:
Error on line 71 char 1: End of element <exif:Flash> not expected in this context
While parsing XMP metadata:
Error on line 85 char 1: End of element <exif:Flash> not expected in this context
Metadata parasite seems to be corrupt
... and so on until I interrupt it.
Could you help me out? What is going wrong here?