1

次の gimp スクリプトを使用して、フォルダー内のすべての画像を 180° 回転させています (スクリプトは の下に保存されています~/.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)))))

私はこのようにスクリプトを呼び出しています:

gimp -i -b "(batch-rotate \"*.JPG\" 1)" -b '(gimp-quit 0)'

そして、次のエラーが表示されます。

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

... など、中断するまで。

手伝ってくれませんか?ここで何がうまくいかないのですか?

4

2 に答える 2