<?xml version="1.0"?>
<paste-with-annotations>
  <paste>
    <number>
      <integer>60476</integer>
    </number>
    <user>
      <string>apostol</string>
    </user>
    <title>
      <string>Gimp Script-Fu</string>
    </title>
    <contents>
      <string>(define (script-fu-my-photo-convert image drawable gwidth)
   (let* ((start-width (car (gimp-image-width image)))
           (start-height (car (gimp-image-height image))))
     (set! black '(0 0 0))
     (set! white '(255 255 255))
     (set! gwidth gwidth)
     (set! gheight (/ start-height( / start-width gwidth)))
     (gimp-image-scale image gwidth (/ start-height( / start-width gwidth)))

     (gimp-levels-stretch drawable)  ; autocorrect white balance
     (gimp-palette-set-foreground white)
     (gimp-rect-select image 5 5 (- gwidth 10) 1 0 0 0)
     (gimp-rect-select image 5 (- gheight 5) (- gwidth 10) 1 0 0 0)
     (gimp-rect-select image 5 5 1 (- gheight 10) 0 0 0)
     (gimp-rect-select image (- gwidth 5) 5 1 (- gheight 10) 0 0 0)
     (gimp-edit-fill drawable 2)
;     (gimp-image-rotate image 0)
     (gimp-selection-none image)
     (gimp-displays-flush)))

(script-fu-register &quot;script-fu-my-photo-convert&quot;
	 _&quot;&lt;Image&gt;/Script-Fu/Render/My Photo Convert&quot;
	&quot;Converting photos from SonyEricsson K750i camera into 500px wide autocorrected photos with nice white frame. Designed for usage with LJ blogs.&quot;
	&quot;Ivan Daniluk &lt;my@email.com&gt;&quot;
	&quot;Ivan Daniluk&quot;
	&quot;2006/07/23&quot;
	&quot;&quot;
	SF-IMAGE &quot;Image&quot; 0
	SF-DRAWABLE &quot;Drawable&quot; 0
      SF-VALUE _&quot;Width&quot; &quot;500&quot;
)</string>
    </contents>
    <universal-time>
      <integer>3419280811</integer>
    </universal-time>
    <channel>
      <string>#scheme</string>
    </channel>
    <colorization-mode>
      <string>Scheme</string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <keyword>TRUE</keyword>
    </is-unicode>
  </paste>
</paste-with-annotations>