The main change I'm making in the command structure is to let user estimate (visually) what fraction to chop off from each edge, and enter a simple textual command such as "l3 r2 b4" to chop 30% (0.3) off the left side and 20% (0.2) off the right side and 40% (0.4) off the bottom simultaneously. No grid will be displayed overlaying the image.
.
What follows below is a guided tour through the process of cropping images using this new software. As of 2010.Jun.30 21, the software to do the actually resampling from rectangle within large to exactly fit a 119*119-pixel rectangle on the cellphone screen has been written, and can be run from my Unix shell account, which is how I created the first images (after the original GIANT image shown below). This image-cropping-resampling program needs to be called from a PHP script. The command loop for issuing crop commands, parsing them, and executing them, was also written, but it's a straight program loop and needs to be broken apart into separate CGI/HTTP transcactions to work as a Web-server application. The software for automatically running a Google Image search and collecting the URLs and associated description, then for downloading a selected full-size image, was also written, but will remain as my personal Unix application until all the rest of the software is already working and demonstrated.
.
The first section below show only what I've accomplished, after finding a Google image, by running the cropping+resampling program from the Unix shell. Later sections will be written after I I've written a PHP script for managing the cropping and resampling from my cell-phone.
.
I used my Lisp software to do a Google image search for Vanessa Marano, an actress who appeared in a recent episode of "Medium", downloading the HTML source for the Web page that contains the first 20 hits. My software then parsed that HTML, found the table of images+info, collected the URLs and descriptions, parsed the descriptions to get the width*height and filesize info, picked the widest which was also the largest file size. This JPEG image is 2500 pixels wide by 3764 pixels tall, and occupies 1572 kilobytes (1.535 megabytes). My software than called 'wget' to download the image, which turned out to be exactly 1609632 bytes. I then used 'djpeg' with a scale factor of 1/8 to convert to BMP format, yielding a file of 442794 bytes with the image now shrunk to 313 pixels wide by 471 pixels tall. (A BMP of full size from the JPEG would have been about 29 megabytes, which would have left only 3 megabytes in my shell account, which is not acceptable.) Next I ran the C translation from PHP translation of Lisp program I wrote for resampling BMP images to fit cell-phone screens, to yield a 119x119 BMP occuping 42894 bytes of disk. Finally I ran cjpeg with quality of 75% to yield this image of 3643 bytes that can be viewed on my cell-phone. (Note the original aspect ratio was 1 wide per 1.5 tall, whereas to fit the cell-phone screen I've squashed it vertically so the lady looks very stubby.)
.
As you can see, the young lady occupies only a small portion of the image, and her face is so small as to be virtually unrecognizable. This is a good case where cropping (trimming) the other parts of the image away, and expanding the part that has her face to fill the one-inch cellphone screen, would produce a facial image where I could see if she's really the actress I saw in the "Medium" episode. (I'm also curious whose picture is on the poster next to her.