From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <1532258653.755275.1448849456.14D01A7F@webmail.messagingengine.com> From: "Ethan A. Gardener" To: Ryan Gonzalez , Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" In-Reply-To: <164bd6dd850.27a3.db5b03704c129196a4e9415e55413ce6@gmail.com> References: <1532179143.3742505.1448197440.4A02E3CA@webmail.messagingengine.com> <164bd6dd850.27a3.db5b03704c129196a4e9415e55413ce6@gmail.com> Date: Sun, 22 Jul 2018 12:24:13 +0100 Subject: Re: [9fans] I prefer cropping images in Plan 9 Topicbox-Message-UUID: d9652604-ead9-11e9-9d60-3106f5b1d025 On Sat, Jul 21, 2018, at 4:20 PM, Ryan Gonzalez wrote: > On July 21, 2018 8:21:10 AM "Ethan A. Gardener" wrote: > > > I just had to crop a bunch of images in the Gimp, and recalled how much I > > prefer doing it in Plan 9; it's so much less frustrating. In the Gimp, it's > > either a matter of estimating numbers (for a quick, casual job on visual > > media), or select, copy, paste into new window. In the latter case, when > > you save it, you have to find the directory and the file8749832710473name; > > not fun. Also, I'm not practised at this; I'm no good at cropping with my > > brain, so I had to zoom, resize the window, and select very carefully so > > selecting didn't move the image in the window. > > > > In Plan 9, which isn't even made for the job, it's not without its > > frustrations, but it's got fewer of them than the Gimp. Open the image in > > page; use the plumber or otherwise enter the full path so you can > > copy/paste it later. Zoom and adjust the window as you like. In another > > window, grep for the filename (or the directory, or whatever,) in > > /dev/wsys/*/label, and type cd and send the directory part. (Of course, > > copy/paste or send the file name.) Then: > > crop -i 4 window | topng > path/filename.png > > This is the part where you'll likely want to copy the full original path. > > That's one done. On to the next image, which presumably is open in the same > > instance of page so you don't have to cd or anything. `cat label` to get > > its full name and path. (It's possible only 9front's page puts the path in > > the label, I don't know.) > > To be fair, if you're using a command line, you might as well be using > ImageMagick (not criticizing your points or anything, just playing devil's > advocate). `crop -i 4` is just to get rid of the window border. The actual selection of the region of image to crop to, in Plan 9, has nothing to do with the command line.