[Gimp-user] Script-Fu Question about Saving Image to Network Share
Hello, I'm writing a script-fu for use in my office. The idea is to reduce the amount of steps the user needs to take in order to save an acquired screenshot to our website. * *The problem I am having is that I cannot seem to save a file to an smb:// type address. This is the error I get when testing: *[error] *Could not open 'smb://ldad_images/screenshots/web-image.png' for writing: No such file or directory Error while executing (script-fu-Send-to-Web 1 smb://ldad_images/screenshots/ web-image.png) ERROR: Procedural database execution failed: (file_png_save2 1 1 5 smb://ldad_images/screenshots/web-image.png web-image.png 1 9 0 0 0 1 1 0 0) *[/error]* The script works just fine if I save the image to a local drive such as '/tmp/'. Also, if I type this in a terminal: nautilus smb://ldad_images/screenshots/ A file browser opens just fine into the shared 'screenshots' directory. If saving to a network drive is not possible (such as smb://), is there some other trick I could use to get the image over there? Suggestions would be helpful :-) Here's the code I have thus far: *[code] *(define (script-fu-Send-to-Web Image Location Filename) ; the directory our file will be saved in (set! SRCFilename (string-append Location Filename)) ; scale the image to our optimum web size (set! width (car (gimp-image-width Image))) (set! height (car (gimp-image-height Image))) (if ( width 470) (begin (set! newHeight (/ (* 470 height) width)) (gimp-image-scale Image 470 newHeight) (gimp-displays-flush) ) ) ; add a drop shadow (set! drawable (car (gimp-image-get-active-drawable Image))) (script-fu-drop-shadow Image drawable 8.0 8.0 15.0 '(0 0 0) 80.0 TRUE) (gimp-displays-flush) ; save as png file to our www directory on ldad (or wherever the user indicated) (gimp-image-merge-visible-layers Image 0) (gimp-displays-flush) (set! drawable (car (gimp-image-get-active-drawable Image))) (file-png-save2 RUN-NONINTERACTIVE Image drawable SRCFilename Filename 1 9 0 0 0 1 1 0 0) (gimp-displays-flush) ; Close out the image (gimp-display-delete Image) ; Let user know it's online (gimp-message Cool! Your picture is online. You may now include it in a 'Top News of the Day' article.) ) ; Register the function with the GIMP: (script-fu-register script-fu-Send-to-Web Toolbox/NWS/Send To Web Scales the image to 500px width and saves it to www images rsync directory on LDAD. Tony Freeman 2007, National Weather Service, Louisville March 06, 2007 RGB* GRAY* SF-IMAGEThe Image 0 SF-STRING Location smb://ldad_images/screenshots/ SF-STRING File Name web-image.png )* **[/code]* ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Script-Fu Question about Saving Image to Network Share
Hi, On Sat, 2007-03-10 at 12:58 -0500, Tony Freeman wrote: If saving to a network drive is not possible (such as smb://), is there some other trick I could use to get the image over there? GIMP 2.2 doesn't save to remote locations. You could try your luck with the 2.3 development version or use the command-line utility gnomevfs-mv to move the file to the SMB share. Sven ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Script-Fu Question about Saving Image to Network Share
Hi, [EMAIL PROTECTED] (2007-03-10 at 1258.19 -0500): If saving to a network drive is not possible (such as smb://), is there some other trick I could use to get the image over there? Mount the network drive. You can use smbmount or fusesmb, for example. Then files will appear in the main tree, for all apps. GSR ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] script-fu question
Thanks for the pointer! I tried it on one of the scripts and it worked perfecthope the other scripts con be converted so easy, too. Sven [EMAIL PROTECTED] schrieb: Kevin Cozens provides a script written in Perl which will convert older script-fus to work with the newer API (http://www.interlog.com/~kcozens/software/gimp/2.0/script-update.pl). Even if you do not have Perl on your machine, you should be able to use the information in the script to determine the necessary modifications. Quoting Sven Görsmann [EMAIL PROTECTED]: My question: Do you know any manuals or links that could help me in converting the old scripts to work again, for example a list which shows the old function on the left an the new on the right.or something like a how-to ? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] script-fu question
Hi there! I have the following problem: in the past i used some gimp script-fus that i wrote to run under gimp 1.1.x and 1.2.x. Then script-fu function names/calls changed a lil bit and the scripts didn't work anymore. The script-execution ends in a pop-up-box with errors. Same thing with other cool scripts i collected in the past for the older versions of gimp. Now i want to convert the scripts to work und the actual gimp version(s) again. My question: Do you know any manuals or links that could help me in converting the old scripts to work again, for example a list which shows the old function on the left an the new on the right.or something like a how-to ? Regards, Sven Goersmann ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] script-fu question
Kevin Cozens provides a script written in Perl which will convert older script-fus to work with the newer API (http://www.interlog.com/~kcozens/software/gimp/2.0/script-update.pl). Even if you do not have Perl on your machine, you should be able to use the information in the script to determine the necessary modifications. Quoting Sven Görsmann [EMAIL PROTECTED]: My question: Do you know any manuals or links that could help me in converting the old scripts to work again, for example a list which shows the old function on the left an the new on the right.or something like a how-to ? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Script-Fu question ... Callinging another script from within?
All, Is it possible to call an interactive script from within an interactive script? Let me clarify... If I call script-fu-test1, and I fill out the parameters and let it compute, is it possible to have that script call another script that asks me for more input parameters? One case that I'm considering ... I am trying to create a complete web-theme image gallery (buttons, bullets, logos, etc) but there isn't enough space on a single input form to gather all the information at once, so I want to break it down by function, but starting with some base info. So on the initial page I would set things like to fg bg colors, font type, sizes, etc, but then when it goes to create the bullets, I can further refine how I want them created, and the same would go for the other gallery types as well. I've tryed registering my script-fu functions with gimp (sucessfully), but I can't seem to find the proper way to call them from within my script. Thought??? Is it even possible? Thanks Matt ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user