gimp native batch convert? - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions) +---- Thread: gimp native batch convert? (/Thread-gimp-native-batch-convert) |
gimp native batch convert? - y2keeth - 05-22-2023 anybody give me a example of using scriptfu to convert a entire directrory of tga to dds RXGB dtx5 since bimp don't work anymore for dds RE: gimp native batch convert? - Ofnuts - 05-22-2023 An example with Python-fu. In your case you would slip the photocopy/cartoon calls, and replace the file_jpeg_save() with a file_dds_save() with the adequate parameters. RE: gimp native batch convert? - y2keeth - 05-22-2023 (05-22-2023, 07:28 AM)Ofnuts Wrote: An example with Python-fu. thanks a lot RE: gimp native batch convert? - y2keeth - 05-23-2023 (05-22-2023, 12:39 AM)y2keeth Wrote: anybody give me a example of using scriptfu to convert a entire directrory of tga to dds RXGB dtx5 " slip the photocopy/cartoon calls" what does "slip" mean? RE: gimp native batch convert? - Ofnuts - 05-23-2023 (05-23-2023, 03:28 AM)y2keeth Wrote:(05-22-2023, 12:39 AM)y2keeth Wrote: anybody give me a example of using scriptfu to convert a entire directrory of tga to dds RXGB dtx5 I meant "skip". RE: gimp native batch convert? - y2keeth - 05-24-2023 (05-23-2023, 12:38 PM)Ofnuts Wrote:(05-23-2023, 03:28 AM)y2keeth Wrote:(05-22-2023, 12:39 AM)y2keeth Wrote: anybody give me a example of using scriptfu to convert a entire directrory of tga to dds RXGB dtx5 oh ok lol RE: gimp native batch convert? - y2keeth - 05-26-2023 (05-24-2023, 04:55 AM)y2keeth Wrote:(05-23-2023, 12:38 PM)Ofnuts Wrote:(05-23-2023, 03:28 AM)y2keeth Wrote: " slip the photocopy/cartoon calls" any examples of dds settings? RE: gimp native batch convert? - y2keeth - 05-27-2023 found this code also but dont see where you set the dds type? (define (convToDDS pattern) (define filelist (cdr (file-glob pattern 1))) (define filelist (car filelist)) (while (not (null? filelist)) (define filename (car filelist)) (define image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (define drawable (car (gimp-image-get-active-layer image))) (define filename (string-append (substring filename 0 (- (string-length filename) 3)) "dds")) (file-dds-save RUN-NONINTERACTIVE image drawable filename filename 1 1 0 0 -1 0 0 ) (set! filelist (cdr filelist)))) i know its 7 for rxgb RE: gimp native batch convert? - rich2005 - 05-27-2023 If you go to Gimp menu Windows -> Help -> Procedure Browser you will find a listing of the required parameters. [attachment=9837] RE: gimp native batch convert? - Ofnuts - 05-27-2023 Filters ➤ Python-fu ➤ Console ➤ Browse and ennter DDS in the search bar: [attachment=9836]
And if you hit Apply the python console is pre-filled with a call: [attachment=9838]
So, possibly, using the same names as in the python example code: Code: pdb.file_dds_save(image, drawable, outfile, outfile, 7, 0, 0, 0, 0, 7, 0, True,True,2.24,True,False,.5) Where the 7 is the documented value for RXGB (DXT5). The python documentation should be read with a grain of salt because it is auto-generated from the same sources as the script-fu docs and Pythin and Scheme have a different syntax.
Code: pdb.file_dds_save(image, drawable, outfile, outfile, |