Re: [Gimp-developer] Invalid input arguments of file-raw-save2

2020-02-27 Thread Ofnuts

Looking at the source code; RAW_PLANAR would be 6 (the plugin defines
many images types, but only accepts RAW_RBG and RAW_PLANAR when saving).



___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] Invalid input arguments of file-raw-save2

2020-02-27 Thread longquan_135--- via gimp-developer-list
 (<= theRowIndex theRowCount)
(set! theY (+ (* theRowIndex (- inChunkLength 1)) inYPos))
(if (< theY (- theImageHeight 1))
(begin
(set! theColumnIndex 0)
(while (<= theColumnIndex theColumnCount)
(set! theX (+ (* theColumnIndex (- inChunkLength 1)) 
inXPos))
(if (< theX (- theImageWidth 1))
(script-fu-save-selection inImage
inDrawable
theRowIndex
theColumnIndex
theX
theY
inChunkLength
theImageWidth
theImageHeight)
)
(set! theColumnIndex (+ theColumnIndex 1))
)
)
)
(set! theRowIndex (+ theRowIndex 1))
)
)
)

(script-fu-register
"script-fu-split-image"  ;func name
"Split Image";menu label
"Split image at top left point with length." ;description
"XX" ;author
"copyright XXX, 2019, XX";copyright notice
"December 28, 2019"  ;date created
"RGB* GRAY*" ;image type that the script 
works on
  SF-IMAGE   "Image to Split"0
  SF-DRAWABLE"Drawable to Split" 0
  SF-VALUE   _"X Position"   "0"
  SF-VALUE   _"Y Position"   "0"
  SF-VALUE   _"Chunk Length" "513"
)

(script-fu-menu-register "script-fu-split-image"
 "/Filters/Web")
---
2. Open an image with GIMP.
3. Select from menu “Filters” -> “Web” -> “Split Image”.
4. Click the OK button on the dialog, and you can find the error message from 
GIMP’s Error Console:
Split Image Warning
Error while executing script-fu-split-image:
Error: Procedure execution of file-raw-save2 failed on invalid input arguments.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list