Wednesday, The crop tool & open source
Thursday, February 22nd, 2007Ok, so here is the beauty of open source. Things like this happen all the time. Infact they have happened so often that I never bothered blogging about it until today:
9:00 am
Some authors had submitted screenshots for a document.. Screenshots of the same 7 steps In 20 odd language.
Fortunately, the screenshots were only taken of the application window for most languages. Unfortunately, the size of each window was radically different ranging from 1600×1200 maximised to 600×300.
“I know an easy fix, the gimp will save us”
10:00 am After an hour of manually scaling down ui components of all these screenshots to fit the same neat 500×420 scale, it was time to output each screenshot as a png and commit it back to our repo.
Time for the crop tool

The crop tool in the gimp is quite handy:
You can both crop the current layer only… (neatly removing the junk around your selected area on that layer only).
You can also crop the whole image… ( needed when you have a large canvas from all those big screenshots and now need to output just the small portion as a stand-alone image.)
This next part is potentially heart breaking for the graphics geek in a deadline rush ( but dont worry I saved).
Anyway, I had cropped all my screenshot layers so that only the borderless area was visible. I then wanted to crop and save each layer as quickly as possible (beacause the clock was ticking).
The “current layer only” is really handy because it will only allow the user to move the crop reigon within the crop area of the current layer. This means if i had previously used the crop tool to neaten all my crud on the edges of each screenshot(layer) I could then use the crop tool to make my selections on each layer really fast because of the constrained selection area. This was working great from Traditional Chinese all the way to Korean.

10:30 am THEN IT HAPPENED!
I had a crop selection overlapping my layers crop area and clicked on the notorious “current layer only” option. I proceeded to grab one of the corner handle from the crop area and attempt to move it back inside the current layers area (thinking the current layer only option would snap this back inside).
Instead of my desired behaviour: BOOM gimp segfaults on me, crashing without warning. (not a problem, remember i had saved.. calm down)
This was a deadline where I couldn’t have afforded to re-perform any of the steps i just mentioned.
11:00am Once I got the screenshots out the door I pounced to my IRC window and pasted a makeshift bug report asking for confirmation then slammed open gimp’s bugzilla page and looked for duplicates.
Joao confirmed and mentioned he had looked at the crop tool code recently so he would be able to examine the cause.
11:30am Doing other things, i got caught by the same bug once before lunch. That was the second time …. bud i’d filed a bug … never again!
2:00pm
I came back from lunch and sitting in my bug report was a patch to fix my problem!
ONLY 3 HOURS AFTER FINDING A BUG MY PROBLEM WAS FIXED.
In that time: Joao had managed to replicate, work on and submitt a patch that solved the crash.
You won’t believe the number of times inkscape developers pjrm, bulia, nathan and more have fixed program functionality like this.
Now imagine trying to get that though even the most exclusive SLA with Adobe. It just won’t happen. And especially not for free.
Update: Joao is modest
joao: but this was slow.
joao: I’ve seen bugs in gimp from report to fix commited in less than 20 minutes.
joao: I am nowhere near these times.






