Slice and Dice Images with ImageMagick
You can use the convert command that comes with ImageMagick to extract parts of an image.
You can cut out a 100-pixel-wide chunk from somewhere in the middle of an image:
$ convert -crop 100x+0+0 orig/wrapperbg775.gif slice0.gif $ convert -crop +200+0 orig/wrapperbg775.gif slice1.gif $ convert +append slice0.gif slice1.gif wrapperbg675.gif
You can duplicate a 100-pixel-wide chunk from somewhere in the middle of an image:
$ convert -crop 100x+100+0 orig/wrapperbg775.gif slice100.gif $ convert +append slice0.gif slice100.gif slice 100.gif ↪slice1.gif wrapperbg875.gif
Note that there was no need to specify the height of the image in any of the above commands. If you need to adjust the height instead of the width, the steps are similar, but use -append instead of +append to paste the slices vertically.
Getting Started with DevOps - Including New Data on IT Performance from Puppet Labs 2015 State of DevOps Report
August 27, 2015
12:00 PM CDT
DevOps represents a profound change from the way most IT departments have traditionally worked: from siloed teams and high-anxiety releases to everyone collaborating on uneventful and more frequent releases of higher-quality code. It doesn't matter how large or small an organization is, or even whether it's historically slow moving or risk averse — there are ways to adopt DevOps sanely, and get measurable results in just weeks.
Free to Linux Journal readers.Register Now!
- Three More Lessons
- Django Models and Migrations
- August 2015 Issue of Linux Journal: Programming
- Hacking a Safe with Bash
- Secure Server Deployments in Hostile Territory, Part II
- The Controversy Behind Canonical's Intellectual Property Policy
- Shashlik - a Tasty New Android Simulator
- Huge Package Overhaul for Debian and Ubuntu
- Embed Linux in Monitoring and Control Systems
- KDE Reveals Plasma Mobile