Re: [Gimp-user] Script-Fu: remove Exif, thumbnail, color profile when saving PNG
After Open the Image, Get width and height. Copy the image. Create a new image using the values. Add a new layer from the copy into the new image. Export to the file. OR Set metadata-string to NULL ("") Do pdb gimp-image-set-metadata (Notice; Only Remove EXIF) Example on Console > (define metadata-string "") metadata-string > (define image 1) image > (gimp-image-set-metadata image metadata-string) (#t) 2022年8月25日(木) 11:27 Sam Lee via gimp-user-list : > On 2022-08-24 18:52 +0200, Ofnuts via gimp-user-list wrote: > > Why do you use Gimp for this... You script would run faster using > > ImageMagick (for the conversion) and ExifTool (to remove the Exif data): > > > > convert in.png PNG8:out.png > > exiftool all= out.png > > I am not using GIMP specifically to remove an image's Exif data, its > thumbnail, and its color profile. The script that I have given in the > first email is just an example. I just want to remove such data when > saving PNG files using Script-Fu in general. Options are available to > omit such data when saving interactively in the GUI. Is there a way to > do this non-interactively using Script-Fu? > ___ > gimp-user-list mailing list > List address:gimp-user-list@gnome.org > List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list > List archives: https://mail.gnome.org/archives/gimp-user-list > ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list
Re: [Gimp-user] Script-Fu: remove Exif, thumbnail, color profile when saving PNG
On 2022-08-24 18:52 +0200, Ofnuts via gimp-user-list wrote: > Why do you use Gimp for this... You script would run faster using > ImageMagick (for the conversion) and ExifTool (to remove the Exif data): > > convert in.png PNG8:out.png > exiftool all= out.png I am not using GIMP specifically to remove an image's Exif data, its thumbnail, and its color profile. The script that I have given in the first email is just an example. I just want to remove such data when saving PNG files using Script-Fu in general. Options are available to omit such data when saving interactively in the GUI. Is there a way to do this non-interactively using Script-Fu? ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list
Re: [Gimp-user] Script-Fu: remove Exif, thumbnail, color profile when saving PNG
Why do you use Gimp for this... You script would run faster using ImageMagick (for the conversion) and ExifTool (to remove the Exif data): convert in.png PNG8:out.png exiftool all= out.png On 24/08/2022 15:52, Sam Lee via gimp-user-list wrote: Hello, I have written a Script-Fu batch program that is intended to reduce the file size of a PNG image ("in.png") by converting it into "indexed" mode with a color palette of 16 colors, and saving the output ("out.png"): #!/bin/sh gimp-console --batch ' (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE "in.png" "in.png"))) (drawable (car (gimp-image-flatten image))) (outfile "out.png")) (gimp-image-convert-indexed image CONVERT-DITHER-NONE CONVERT-PALETTE-GENERATE 16 FALSE FALSE "") (file-png-save2 RUN-NONINTERACTIVE image drawable outfile outfile FALSE 9 FALSE FALSE FALSE FALSE FALSE FALSE FALSE)) (gimp-quit 0)' This script works. However, it always includes Exif data, thumbnail, and the color profile when I save the PNG, which I do not want because they make the saved image larger. I know that if I change `(file-png-save2 RUN-NONINTERACTIVE ...)` to `(file-png-save2 RUN-INTERACTIVE ...)`, a dialog will pop up where I can uncheck the "Save Exif data", "Save thumbnail", and "Save color profile" checkboxes. I want to disable the "Save Exif data", "Save thumbnail", and "Save color profile" in a non-interactive way (i.e. without requiring the interactive dialog box) when saving a PNG. How can I do that? ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership:https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives:https://mail.gnome.org/archives/gimp-user-list ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list