If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Wrote a GIMP extension to do scaling, EXACTLY what I want
This extension provides four functions for changing image size:
1) Decrease size by 15%: "," 2) Increase size by 15%: "." 3) Decrease size 2x: "Alt-," 4) Increase size 2x: "Alt-." Then I defined four keyboard shortcuts mentioned in quotes above and now I have the EXACT functions that I had in xv. I am a very happy GIMP user now, because I know that I can automate what I do in the way I want. I have no clue about Scheme, but I am a computer programmer and I can do "intelligent cut and paste from google". Source code follows: ################################################## #################### ;; Image rescaling. Copyright (C) Igor Chudov, Licensed under GPL 2.0 (define (script-fu-rescale img factor ) ;; rescale (gimp-image-scale img (* (car (gimp-image-width img)) factor) (* (car (gimp-image-height img)) factor) ) ;; Flush the display (gimp-displays-flush) ) (define (script-fu-rescale-up img) (script-fu-rescale img 1.15) ) (define (script-fu-rescale-down img) (script-fu-rescale img 0.8695) ) (define (script-fu-rescale-up2x img) (script-fu-rescale img 2) ) (define (script-fu-rescale-down2x img) (script-fu-rescale img 0.5) ) (script-fu-register "script-fu-rescale-up" "Rescale Up 15%" "Rescale Up 15%" "Igor Chudov" "Igor Chudov" "2008" "RGB*, GRAY*" SF-IMAGE "Image" 0 ) (script-fu-menu-register "script-fu-rescale-up" "Image/Script-Fu/Rescale") (script-fu-register "script-fu-rescale-down" "Rescale Down 15%" "Rescale Down 15%" "Igor Chudov" "Igor Chudov" "2008" "RGB*, GRAY*" SF-IMAGE "Image" 0 ) (script-fu-menu-register "script-fu-rescale-down" "Image/Script-Fu/Rescale") ;;;;;;;;;;;;;;;;;;;;;;;;;;; (script-fu-register "script-fu-rescale-up2x" "Rescale Up 2X" "Rescale Up 2X" "Igor Chudov" "Igor Chudov" "2008" "RGB*, GRAY*" SF-IMAGE "Image" 0 ) (script-fu-menu-register "script-fu-rescale-up2x" "Image/Script-Fu/Rescale") (script-fu-register "script-fu-rescale-down2x" "Rescale Down 2X" "Rescale Down 2X" "Igor Chudov" "Igor Chudov" "2008" "RGB*, GRAY*" SF-IMAGE "Image" 0 ) (script-fu-menu-register "script-fu-rescale-down2x" "Image/Script-Fu/Rescale") -- Due to extreme spam originating from Google Groups, and their inattention to spammers, I and many others block all articles originating from Google Groups. If you want your postings to be seen by more readers you will need to find a different means of posting on Usenet. http://improve-usenet.org/ |
#2
|
|||
|
|||
Wrote a GIMP extension to do scaling, EXACTLY what I want
Ignoramus27711 wrote:
This extension provides four functions for changing image size: Ignoramus27711 wrote: Hello Igor, good example how to write a script-fu for your own needs. But if someone wants to scale many pictures I propose David's Batch Processor http://members.ozemail.com.au/~hodsond/dbp.html The advantage: I always have to sharpen the results and this plug-in makes it possible. Dirk Hartmann |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How Do I Predict Image Scaling With of Photofinisher Prints? | kc | Digital Photography | 5 | March 24th 07 07:34 PM |
Irby! Do you remember what I wrote about computers? | cyrusthevirus | Digital Photography | 0 | March 9th 07 07:07 AM |
Image Sizing/Scaling - Photshop CS | BobS | Digital Photography | 4 | December 28th 04 07:35 AM |
Robert Monaghan; i love this thing you wrote! | Mike Henley | Medium Format Photography Equipment | 2 | July 1st 04 12:45 AM |
I wrote a Digital Imaging Glossary for myself... | phil Taylor | Digital Photo Equipment For Sale | 0 | November 10th 03 05:36 PM |