GIMP Script to Make SW Robotics Thumbs
After making a whole bunch of thumbnail images for the member and mentor profiles on the Southwest Robotics site this past season, I finally decided last night to automate the process with a GIMP script, in preparation for next year's new people.
So, what does it do? It takes the image it is run on, scales it (gimp-image-scale) to 120px x 90px, and utilizes script-fu-drop-shadow to add a correctly-positioned drop-shadow. (Correctly is, in this case, the same as all the other images I did manually.)
It's a rather simple script; here's the code:
; Script-Fu script to automatically; resize and drop-shadow files for; SWR profile shots; IMPORTANT!; Image must be EXACTLY 4:3 aspect; ratio or it will be distorted.; This script does not measure the; image or do any cropping; it is; up to you to crop the image properly. (define (swr-make-profile-thumb img drawable)(gimp-image-scale img 120 90)(script-fu-drop-shadow img drawable 4 4 8 '(0 0 0) 80 TRUE)) (script-fu-register "swr-make-profile-thumb""Make SWR Profile Thumb""Scales the image to 120x90 and adds an appropriate drop-shadow""Voyagerfan5761""Voyagerfan5761""March 17, 2008""RGB*, GRAY*"SF-IMAGE "Image" 0SF-DRAWABLE "Layer" 0)(script-fu-menu-register "swr-make-profile-thumb""<Image>/Script-Fu/SWR")
Note: The original has my real name and an email address, but I have stripped them out for purposes of posting this in view of Web crawlers.
Input images must be in 4:3 aspect ratio to avoid distortion. I currently have no validation for aspect ratio, nor am I certain that it's even possible to check such things, but if it is I will add it at some point. As can be seen from two of my updates last night on Twitter, I only just learned Script-Fu Scheme less than 10 hours ago.
The only real problem I had was developing the script-fu-drop-shadow line, which kept choking when I tried to set an interactivity mode. I eventually figured out that that parameter wasn't required in 2.4 (or some other weird problem; I'm still not sure).
It's obviously not much, just a few basic lines of the stripped-down Scheme that GIMP uses. Nevertheless, if you use my script as a base for a released script of your own, I would appreciate an acknowledgment. A link back here along the lines of, "Based on a short script by Voyagerfan5761" would be sufficient (note the link on "Voyagerfan5761").
And of course, I'd appreciate any and all comments on this script, be they pointing out a better way to do things, something I missed, a suggestion for validating the aspect ratio (hey, it never hurts to ask). Or even a note that you based a script of your own off of mine. That's highly unlikely, considering I didn't even copy any code examples for this one. (OK, I lifted and modified the registration function from a GIMP tutorial page at GIMP's website, but that's all.)
FIRST Wisconsin Regional Results for Team 2129
Note to visitors on this post: If you got here while searching for the full competition results, I apologize (they can be found at the FIRST website). My original title was rather general, and I have changed it to be more specific. Search engines might not pick up the title change for a while, though, so again I am sorry if you got here in error.
Well, I got back from Milwaukee around 00:20 last night (this morning?) and went to bed within an hour. Among other things, the bus taught me that manufacturers don't pay enough attention to uniform seat spacing. There was one row with an extra several inches of legroom. Sounds like airliners to me. (Oh wait, airlines are today's bus companies. Duh. No wonder the seating arrangements are similar.)
Anyway, yesterday's competition was, for us, only a half day. Ultraviolet, FRC Team 2129, finished at #48, out of the 60 teams in attendance at the Wisconsin Regional Competition, with three wins and five losses. We were done before lunch.
We sat through the top eight teams picking alliance partners for the final rounds, watching our team number stay in the Available column through choice after choice. Eventually we ended up as an alternate for one of the teams (I've forgotten the number), meaning we would have competed in their place if their robot broke beyond reasonable repair, but of course that didn't happen.
The second half of the day, from about 13:00 to 17:00, was spent just watching the increasingly competitive finals between the last alliances. It wasn't a total waste of time because we got to watch a couple other Minnesota teams compete. Robohuskie (2574, St. Anthony Village High School), The Green Machine (1816, Edina High School), and Blue Twilight (2220, Eagan High School) all competed, as well as The Millerbots (2549) of Washburn High School.
Among other things, Team 2549 got into the upcoming nationals. In a way, it's a bit annoying, since we mentored them and this is their rookie year (2129 started in 2007). What's also interesting is the fact that, while our robot could do everything (make laps, push balls, carry balls, put them over the overpass, and place them up there at the end of the match), Washburn's robot had very few capabilities. It was much like the robot from Mukwonago, WI (930), which did only one thing: race around the track and make a lot of laps. Even with the annoyance of being beat out by a rookie team that got their start from us, the stigma is just our dented pride; all of us hope that Washburn does well in the nationals.
Moving on, I took a lot of photos at the events, going through, on average, a battery and a half per day for three days. I also have several video clips. I'm thinking about uploading a couple, perhaps one of the robot in qualifications and one of our team goofing off in the stands, and embedding them here in a later post so as to provide some insight into what happens at those competitions. All the FIRST video sites I've seen have yet to get footage of this week's regional. Heck, even FIRST's own site is lacking alliance details for the latter half of the final rounds. There's a huge amount of data to be uploaded, for everyone involved, so some delays are expected.
On another note, I'll now be back on my normal current-stuff posting schedule. Even though I brought my computer, I didn't use it very much. Time actually spent at the hotel was very limited, and most of it was spent sleeping. We were up at 06:00 every morning and didn't get back until between 20:00 and 22:00 every night. Sleep usually came around 23:30 or 00:00. Email and a bit of Twitter (through Twhirl) was about all I used the computer for.
Over the next couple days I'll get caught up on blogging about stuff that's happened since this past Monday. There are some good Google things in there, as soon as I can get more info on them and write up some semblance of a post on each.
Hope you've enjoyed following my (sparse) updates on the FIRST Wisconsin Regional, and hopefully we'll do better next year. (For reference, we made it to the finals last year. As I said yesterday, we had some bad luck this year.) Meanwhile, there should be some professionally produced photos and videos at the Wisconsin Regional website at some point.
Update (20:17): Changed the title to make the specificity of this coverage more obvious and added a note to that effect. Since I only really talk about Team 2129, the one I'm on, I figure I should say that in the title. That and I see visits from Milwaukee who probably found this in a search for the general results, which can be had at the FIRST website.
Milwaukee Status
Yesterday we had the qualifying matches for the FIRST Milwaukee Regional Competition, which I went to with the Southwest Robotics Team. The day before yesterday was practice matches, as an opportunity to work out bugs on the official arena before the actual competition.
The good news is, our robot was moving up in the rankings. The bad news is, it completely underperformed what I, and many of my teammates, expected.
We battled mechanical problems (our lift prongs got bent on Thursday) and yesterday we couldn't seem to do anything with the lift arm until our final match of the day. The robot didn't tip over (which it did do twice in practice competitions a couple weeks ago), but it just wasn't performing at the level it had been in practice.
Today we'll see how it does, and then go back to Minnesota. We get home around midnight, so I probably won't be blogging about the results at all until Sunday morning. Sleep this week has been a precious thing; each day is a lot of walking around the large arena. Your feet and eyes start to ache and burn (respectively) starting around 16:00, and when you get back to the hotel you just want to go to sleep.
Actually, you want to go to sleep right when the FIRST officials say that the day is done, but there are other (non-robotics-related) activities to do and no time to nap.
I truly have no idea what we'll be doing this morning, but we're about to load the bus with our luggage and walk to the arena, so it shouldn't be long before I find out. Obviously we'll be running the robot some more. Er, I mean "hopefully," not "obviously."
Yes, I know I said I would be posting canned material through Sunday, but I ran out of stuff to post, and I ended up bringing my computer. Plus there's been time to write. (Precious little, but time enough.) So sue me for lying; at the time I wrote my last "current" post, I thought I would be offline.
In light of that, consider this a sort of "bonus" post. Now I have to think of something to publish Sunday morning...
Going Out of Town (FIRST Milwaukee Regional)
As you all probably know by now, I am a member of the wonderful (am I biased?) Southwest High Robotics Team, whose website I designed. Well, we're going to Milwaukee this afternoon, and we'll be back late Saturday night (CDT, of course). It is quite interesting that the team captain hasn't posted about the trip yet on the team blog... But I digress.
What that means for this site is that I'll be publishing stuff I wrote yesterday (and this morning) and scheduled using that wonderful feature that Blogger's still testing (and recently fixed [wait, not fixed-- yes, it's fixed] a bug in). The posts came from ideas that have been sitting in my idea bin (actually a list in Remember The Milk) for a while but have been overshadowed by current events and updates from Google and others.
So there should be no time-sensitive posts made between today and Sunday, March 16. (If anything more than one post a day is published, someone's hacked my account, which would really be a bummer.) I've done my best to make decent rants about things that Microsoft (for example) did in its software that I find annoying.
The only problem is that I've had less time to write because I've been trying to get ahead caught up in school before the trip. My next several posts might seem a bit thrown-together because of that, and I'm sorry for it. I should be back to my normal quality once things settle down. (I wrote two of the posts yesterday morning in about 45 minutes, which is usually about how long it takes to do one entry.)
If you're also a member of a FIRST robotics team and will be going to the Milwaukee Regional this week, look for me, the guy in a purple shirt walking around with a small camera (I also do photography for the team). I don't expect to find any readers there, but hey, who knows?
So enjoy the canned posts, and I'll catch up on any news that happens next week. If I get the chance, I will try to post Twitter updates. Follow me on FriendFeed to get all my activity (including here, Twitter, YouTube, StumbleUpon, Digg, etc.) or on Twitter for just my tweets.
New Photo Galleries
I just launched the new photo albums over at the SW Robotics site. If I do say so myself, they look snazzier than the gallery style I came up with last year for my other project. I might adapt the modifications to work with the older site, since they work so well.
Creating the albums took a lot of elbow grease and patience, but it was mostly tedious copying and pasting filenames, adding captions, and adding more rows. Add organizing an extensible directory structure on the server, and everything took about a week, once I got all the photos. The quickest part was actually getting thumbnails and reasonable Web-sized large graphics that wouldn't break the data transfer bank or make users wait for ages, since Google Picasa can export to HTML page. Copy the thumbnails and images directories to the website's folder, and you can structure the actual gallery however you like. The only thing to worry about is specifying proper image size; if they're not correctly sized, images are stretched and squished to fit the dimensions you specify, often looking funny or just plain bad.
Anyway, new styles for the gallery popups, revamped gallery table styles, and a slick file naming job thanks to the team captain all helped make the albums what they are now, and more pictures should be added at various points during the year.
A Second Robotics Job
Well, it's official. I'm the new Media Captain of the Southwest Robotics Team. I'll be doing photos whenever possible, with my trusty Canon PowerShot SD750. I'm looking forward to it; the previous captain will be doing video editing. This will certainly make loading new photo galleries onto the website easier; I won't have to get CDs or anything from other people.
It’s Good to Have Talents
I deviate from my usual technobabbling to reflect on some of the things that have happened in the last couple of days. I designed a website for the Southwest High Robotics Team, the launch of which I announced earlier this month, and now the team captain would like me to be the Media Captain, in addition to my current position of Website Captain. This would mean that I would not only maintain the site, update the upcoming photo galleries and video pages, and develop new features like our planned wiki, but would also take photos and possibly create posters/edit videos. My skills in the latter two I'm not so sure of, but I have gotten quite a few positive remarks about my picture-taking abilities. I don't know how much of it is skill and how much is luck, but I'll take whatever compliments I get.
It would definitely make adding new photo galleries easier, not having to get burned CDs from the current photographer, and actually kind of knowing what's going on so I can organize the albums on my own. It could mean I'd have to delegate some of the more mundane tasks, like filling in album tables with values, to others (who have offered to help). I might turn into a regular executive-type who never does anything himself. OK, so that's a stretch, but I seriously could find some excuses to delegate tedious tasks. Let's see... Resizing images, filling in HTML templates, adding links, updating website text... The list could potentially go on for a while. Depending on what taking the position would involve, perhaps I will take on the extra challenge, if only to exercise my management and photography skills.
Southwest Robotics Website Launched
After weeks of work, the first version of the Southwest Robotics website has been launched. Upcoming features include a video page, photo galleries, a members' calendar, and possibly a wiki, but the current site has all the basic info and a template that works pretty well in all the major browsers. Check it out at http://www.swrobotics.com/.



