Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
linking a image with its mask
#1
I have tried script for linking a image with its mask but its not working. I need it to be worked urgently. Kindly help.


Code:
(define  (script-fu-auto-mask-image Mask InImage OutImage)
 (let* (
     Image (car (file-tiff-load RUN-NONINTERACTIVE InImage InImage)) ImgW (car (gimp-image-width Image)) ImgH (car (gimp-image-height Image))
     PrimeLayer (car (gimp-image-get-active-layer Image))
     (gimp-layer-add-alpha PrimeLayer))
     (gimp-layer-new Image ImgW ImgH RGB-IMAGE MaskLayer 0 LAYER-MODE-NORMAL)
     (gimp-file-load-layer RUN-NONINTERACTIVE Image Mask)
     (gimp-image-set-active-layer Image MaskLayer)
     (gimp-image-select-color mask CHANNEL-OP-ADD drawable (0 0 0))
     (gimp-image-set-active-layer Image PrimeLayer)
     ;(gimp-edit-clear drawable)
     (gimp-drawable-edit-clear drawable)
     (gimp-image-remove-layer Image MaskLayer)
     (file-png-save-defaults RUN-NONINTERACTIVE Image drawable OutImage OutImage)
   )
 (gimp-displays-flush)
 (gimp-quit TRUE)
)

I am trying to execute it through this command.
gimp -i -c -b '(script-fu-auto-mask-image  "Pictures/test/mask.png" "Pictures/test/DSC00805.tif" "test.png")' -b '(gimp-quit 0)
Reply


Messages In This Thread
linking a image with its mask - by reena - 05-26-2022, 10:34 AM
RE: linking a image with its mask - by rich2005 - 05-26-2022, 11:37 AM
RE: linking a image with its mask - by Ofnuts - 05-26-2022, 10:16 PM
RE: linking a image with its mask - by reena - 05-27-2022, 07:52 AM
RE: linking a image with its mask - by Ofnuts - 05-27-2022, 01:55 PM
RE: linking a image with its mask - by rich2005 - 05-27-2022, 03:48 PM
RE: linking a image with its mask - by reena - 05-31-2022, 08:21 AM
RE: linking a image with its mask - by tmanni - 05-27-2022, 10:20 PM
RE: linking a image with its mask - by rich2005 - 05-31-2022, 11:16 AM
RE: linking a image with its mask - by reena - 06-01-2022, 11:02 AM
RE: linking a image with its mask - by reena - 06-02-2022, 02:25 PM
RE: linking a image with its mask - by rich2005 - 06-02-2022, 03:22 PM
RE: linking a image with its mask - by reena - 06-03-2022, 05:05 AM

Forum Jump: