IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Been playing
Reading , etc.
Yeah, there are a series of steps absolutely required when working with images, and you have to get them all right.
A recorder would be nice.
New Solved
Scheme is yucky.
And the need to rescale after setting resolution
but maintaining the height and width isn't documented
anywhere.
And the arguments to the PNG save function are a real
killer, since most examples show them to be zeros, and
the docs assume some serious graphics knowledge.


\n; Setup input file name\n(set! infile (car  '("c:\\work\\from.png")))\n\n; Load the file\n(set! image ( car (file-png-load 0  infile infile )))\n\n; Show it - for debugging only\n(set! window (car (gimp-display-new image)))\n\n; Pull out the drawable layer\n(set! drawable (car (gimp-image-active-drawable image)))\n\n; Get rid of the non black text\n(gimp-threshold drawable 100 255)\n\n; Crop to the paragraph sides\n(plug-in-autocrop 0 image drawable)\n\n; Change the print resolution \n(gimp-image-set-resolution image 300 300)\n\n; Get the height and width to plug back in to the rescale\n(set! height (car(gimp-image-height image)))\n(set! width (car(gimp-image-width image)))\n\n; Apply the 300 x 300 - don't change the height or width\n(gimp-drawable-transform-scale drawable 0 0 width height 0  1 0 3 0)\n\n; Setup the output file name\n(set! outfile (car  '("c:\\work\\test_out.png")))\n\n; Save it, along with the various flags pieces, with full compression\n(file-png-save 1 image drawable outfile outfile 0 9 1 1 1 1 1)\n
New Re: Solved
Python would be nicer, eh?


Peter
[link|http://www.no2id.net/|Don't Let The Terrorists Win]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Home]
Use P2P for legitimate purposes!
New Almost anything would be nicer.
Even python.
     Re: Gimp help needed - moving to programming - (broomberg) - (5)
         No experience, but here's a tutorial - (pwhysall) - (4)
             Been playing - (broomberg) - (3)
                 Solved - (broomberg) - (2)
                     Re: Solved - (pwhysall) - (1)
                         Almost anything would be nicer. - (broomberg)

Gee whillikers!
41 ms