my own site/word-press duality

now that i think i understand word-press better, i’m wondering if i should just forsake my own site completely, re-write the “side-bar” to replace my own navigation system, and rely solely on word-press…of course that would make me sad because i have spent so many hours developing my navigation scripts…

imageDistortPerspective()

This is a script that uses gd2 and imagemagick to remap a rectangular image to a trapezoidal one, a la cover-flow. I originally made it to go with a modified version of imageflow. The function is intended to post-process a thumbnail .png image saved to the server by some other scripts, which already have given it a border and a reflection.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
function imageDistortPerspective($src,$dst,$direction,$box,$params) {  
    // takes a box of dimensions $box ($box[0] = width ; $box[1] = height)
    // and transforms it into a trapezoid
    //   $direction = ['left'|'right'] sets which side is shrunk
    //   amount of vertical shrink is set by $params[0]
    //   the box is also shrunk horizontally to maintain ``aspect'' by $params[1]
    // the image is centered onto the original canvas by shifting it by shrink*w/2
    //
    //  xL,0
    //  --------
    //  | NW    ---------
    //  |                -------  < xR,y1
    //  |                   NE |
    //  |                      |
    //  |                   SE |
    //  |                -------  < xR,y2
    //  |SW     ---------
    //  --------
    //  xL,h
    //
   
    $pinch = $params[0]; $shrink = $params[1];
    $w = $box[0]; $h = $box[1];
    $y1 = round($h * $pinch);           // these are caretesian coordinates
    $y2 = round($h * (1-$pinch));       // see comment picture above for
    $xL = floor(($w * (1-$shrink))/2);  // which corners on the trapezoid
    $xR = $xL + round($w*$shrink);      // they correspond to
   
    // the corner coordinates of the ORIGINAL box (rectangle)
    $NWo = "0,0"; $NEo = "$w,0"; $SWo = "0,$h"; $SEo = "$w,$h";
   
    // the corner coordinates of the NEW box (trapezoid)
    switch($direction) {
        case 'left':
            $NW = "$xL,0"; $NE = "$xR,$y1"; $SW = "$xL,$h"; $SE = "$xR,$y2";
            break;
        case 'right':
            $NW = "$xL,$y1"; $NE = "$xR,0"; $SW = "$xL,$y2"; $SE = "$xR,$h";
            break;
    }
   
    // set imagemagick operation tags
    $op = "-matte    -virtual-pixel transparent   -distort Perspective";
    // shell-execute ``convert'' (imagemagick)
    exec("convert $src $op '$NWo,$NW  $NEo,$NE  $SWo,$SW  $SEo,$SE' $dst");
    // chmod($dst,0775);    // chmod to g+w so i can have write access
   
    // since imagemagick seems to create a larger png files than GD does,
    // we re-import and re-save with GD (overwrite)
    // $tmpimg = imagecreatefrompng($dst);
    // imagesavealpha($tmpimg,true);
    //      imagealphablending($tmpimg, false);
    // imagepng($tmpimg,$dst);
    // imagedestroy($tmpimg);
}

wish list for mac os features

Finder needs some power features. For example, the spotlight search bar shouldn’t be for spotlight…spotlight is system-wide, so why have a box for it at the local finder window level? That search box should behave like the iTunes search box or the Safari search box, as more like a display filter.

Or how about a terminal command box at the bottom of finder to do quick commands in the local folder? Maybe this would be a non-issue if I were more savvy with context menus and things…

In short, it would be nice to have Finder be more integrated into the unix sublevel.

Oh, also, bring back the Tiger behavior for Finder windows remembering their last view-mode! On what planet is it logical to make every subsequent instance of Finder behave like the previous window, regardless of location??

what a long day

i’m such a procrastinator. Jorge Cham (phd comics guy) said it was ok, but man, I take it to a new level. Midnight deadline for abstract submissions? Check…starting 3pm that day! Don’t know if I’m allowed to submit certain things? No problem…easier to ask forgiveness than to ask permission, right? Using people as authors without asking? Sure thing. And the stress associated with that? Evidently I live for it…or simply am too stupid to learn my lesson. I don’t understand how other people just grow up and become responsible. At least I have somewhere to rant now, without bothering people on IM. I think maybe my friends will like me better now. I still don’t know where the publish button is on this thing.

here’s to my new website!

I did not realize how robust these blogwares were…on the other hand, they are hard to customize. But here we are, with a partially functional theme that tries to incorporate wordpress into my site design. I used to scoff at bloggers, but I want to try to be one. Maybe I was just jealous.

don't see anything? you might have javascripts disabled. click here to ignore my javascripts
 

php execution time: 1.1888 seconds

page last modified: about 6 months ago on 06 Mar 2010

 

valid xhtml 1.0

hold on just a sec...

or click here to continue