Home
Anserine

> Recent Entries
> Archive
> Friends
> User Info
> My Website


Inverlacer! [+1]

Sidebar summary [+0]

For any boardies who still bother to look at LJ [+1]


achewood ai albums amv anarchy online bands books boy with pigtails calendar cartoons celebrities chiptune coding community computer cooling creationism culture dinosaurs dreams education einstürzende neubaten emo evolution firefox firth flash freedom of speech fundie gaming geek gender goose goth graffiti grammar graphics graphics card history hosting icon identity illness indie internet kids language law linux lj logic love magnatune math me media meme minneapolis mixtube momus motd movies music mysticism mythology nautilus pompilius news oops pants pickleclicky pictures pointless posts politics portal psu psychology puppeh! rant ray comfort reasons to be militant recycled relativity religion revisionism rhmb rights rp russian sambakza schemes science scotland scrawl scripting scrob second life set theory silly smoking software stebe stereo total stupidity synthpop tag teeth television territorialism terry pratchett the mother of all wristwatches title tutorials unfinished uni video games videos violence vocaloid words writing xkcd

January 6th, 2008


01:50 am - Inverlacer!
I wrote a little program that will read in a graphics file, invert every second line, and write a new file as the output.

Source (Look Ma! No comments!) )

It depends on a command called convert, which is pretty standard in Linux distributions. I'm not 100% certain this would work on Windows, but if it does it would need ImageMagick to be installed and "rm temp.ppm" would probably have to be changed to "del temp.ppm". (How come the Windows command to remove a directory is rd, following the UNIX pattern of rm to remove a file, but the Windows command to remove a file doesn't follow that pattern? Oh, wait, I'm expecting consistency from Microsoft. My bad.)

It's not quite finished, yet. It would be nice if it would write an image file in any format, and not just PPM format. That's easy but I'm lazy. It would also be nice if it deleted the temporary file it uses when it was finished. There's really kind of no excuse for it not doing that, I'm afraid. (Fixed.) It could do a little more error-checking too, so that it doesn't do silly things if the file doesn't exist or whatever.

The biggest issue is that it doesn't do what I want. It does a full RGB invert which is kind of ugly, when what I really want to do is convert the RGB value to HSV, invert the V, and then convert the result back to RGB. That can really be quite pretty, but as you can probably figure by looking here, is somewhat non-trivial. Ugh maths.



By way of example with my beautiful face, the image on the left is the original, the one in the middle is what this program does, and the one on the right (which took me fucking ages to do in GIMP) is what I want it to eventually do.

(1 territory-marking |-| Mark territory)

October 29th, 2007


04:46 am - Sidebar summary
Okay, I wrote a page-summary dealie for my LJ-sidebar, but it's broken again. Seemingly now it only wants to navigate to entries that actually have a subject line. But your entries should have subject lines, you lazy sods. Well, at least I know where I've gone wrong. I'm not sure I can be bothered to fix it at this moment though.
Tags: ,

(Mark territory)

August 31st, 2007


08:49 am - For any boardies who still bother to look at LJ
Introducing pickleclicky 0.5[alpha]

Pickleclicky is a Greasemonkey script I wrote for Firefox for the Radiohead Message Board. It scans messages for URLs and converts them into clickable links. It's not finished yet (hence the fact that the version is lower than 1.0 and is still alpha), and has a few annoying bugs (like changing all the text to Times New Roman) but it's already functional.

You can find out more about it at my website.

(1 territory-marking |-| Mark territory)


> Go to Top
LiveJournal.com