![]() In Linux, that gives (brace yourself): gimp -idf -batch-interpreter python-fu-eval -b 'image=pdb.gimp_file_load("/tmp/bigger.png","/tmp/bigger.png") image.scale(int(image.width*.5),int(image.height*.5)) pdb.gimp_file_save(image, image.active_layer, "/tmp/smaller.png","/tmp/smaller.png")' -b 'pdb.gimp_quit(1)' So, you can still put everything in a one liner. Pdb.gimp_file_save(image, image.active_layer, '/tmp/smaller.png','/tmp/smaller.png') Image.scale(int(image.width*.5),int(image.height*.5)) The shortest code to scale down an image: image=pdb.gimp_file_load('/tmp/bigger.png','/tmp/bigger.png') My solution has been inspired by this post: (gimp-2.8:22244): LibGimpBase-WARNING **: gimp-2.8: gimp_wire_read(): errorīatch command experienced an execution error:Įrror: ( : 1) *: argument 1 must be: number ![]() (gimp-file-save RUN-NONINTERACTIVE image drawable new-filename new-filename) (gimp-image-scale-full image (* width scale) (* height scale) INTERPOLATION-CUBIC) (drawable (car (gimp-image-get-active-layer image))) (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) I have tried with this Guile script: (define (resize-image filename new-filename scale) ![]() I know that convert of ImageMagick makes this task trivial, but I cannot use ImageMagick, therefore I am leaning towards Gimp (on Windows). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |