RSS/Atom feed Twitter
Site is read-only, email is disabled

gimp-file-save

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

gimp-file-save Ron Stanonik 13 Mar 00:23
  gimp-file-save Carol Spears 13 Mar 00:47
Ron Stanonik
2003-03-13 00:23:43 UTC (about 21 years ago)

gimp-file-save

Hi,

I have a simple script-fu which gimp-file-load's an image and gimp-file-save's it back out, unchanged. Eventually, it will do something useful, but for now it's a sanity check of my (mis)understanding of script-fu. It works for gif, but on jpg the result looks as if the quality is 0. I thought Gimp would use some reasonable default quality. If I change the script to interactively gimp-file-save (0 not 1), then the save dialog does specify a quality of 0.75 and the jpg looks fine. I can't use file-jpeg-save because I can't assume jpeg. I can't use the interactive save because this will be applied to many images, probably via the script-fu server (from scheme). For now I'm testing using the script-fu console.

I'm running Gimp 1.2.3-4 from the RedHat 7.3 distribution.

Thanks,

Ron Stanonik stanonik@cogsci.ucsd.edu

(define (script-fu-readwrite filename) (let*
((image (car (gimp-file-load 1 filename filename))) (layer (car (gimp-image-active-drawable image)))) (gimp-file-save 1 image layer filename filename)))

(script-fu-register "script-fu-readwrite"
"/Xtns/readwrite"
"description"
"author"
"copyright"
"date"
""
SF-STRING "Filename:" "/tmp/crumb.jpg" )

Carol Spears
2003-03-13 00:47:45 UTC (about 21 years ago)

gimp-file-save

On 2003-03-12 at 1523.43 -0800, Ron Stanonik typed this:

Hi,

I have a simple script-fu which gimp-file-load's an image and gimp-file-save's it back out, unchanged. Eventually, it will do something useful, but for now it's a sanity check of my (mis)understanding of script-fu. It works for gif, but on jpg the result looks as if the quality is 0. I thought Gimp would use some reasonable default quality. If I change the script to interactively gimp-file-save (0 not 1), then the save dialog does specify a quality of 0.75 and the jpg looks fine. I can't use file-jpeg-save because I can't assume jpeg. I can't use the interactive save because this will be applied to many images, probably via the script-fu server (from scheme). For now I'm testing using the script-fu console.

this was true for pygimp. the only way i could work around it was to use file-jpeg-save.

sorry. hopefully it will be fixed for gimp-1.4

carol