I needed a quick and dirty command line tool to convert a jpg to a png. Lo and behold, I found the image conversion utility called "convert" on my Fedora Core 6 system from the ImageMagick open source tools, http://www.imagemagick.org/. ImageMagick is now part of the graphics programs packaged with the Core 6 distribution.
Anytime I have a simple task that I can automate or just speedily get done, it usually involves a command line tool. I love command line tools for this reason. I won't belabor describing the software because Linux Journal has already done it for me here:
http://www.linux-mag.com/id/2561/
You can do basic things like resize, crop and convert to different formats. Your command can be as simple as this:
convert [sourceImage] [destinationImage]
example:
convert image.jpg image.png
It is that easy. No opening GIMP just to convert. The program can also do sophisticated image processing using effects. Typing "convert" with no arguments after the command name will give you a full list of the capabilities of the software.
To scale an image, try this command:
convert [sourceImage] -scale [WidthxHeight] [destinationImage]
example:
convert image.jpg -scale 1024x768 newimage.jpg
This is a great utility folks.
Good man page here:
http://linux.about.com/od/commands/l/blcmdl1_convert.htm
Enjoy!
Showing posts with label command line. Show all posts
Showing posts with label command line. Show all posts
Friday, May 25, 2007
convert: linux command line image conversion and processing utility
Labels:
command line,
convert,
core 6,
fedora,
image manipulation,
linux,
tools
If this post was useful to you..consider buying me a beer via PayPal!
Even a $1 Draft will keep the Mule happily working..and help pay for equipment upgrades!
Friday, February 09, 2007
backing up your HDV content with dual-layer DVD
I finally made the jump to dual DVDs. I successfully burned a dual layer dvd using growisofs! I am very excited! This means I can get that content OFF my hard drives..FINALLY! However, there is a 4.3GB file size limitation, so keep those MPEGTS's small. Or, if you have files you need to backup that are larger than 4.3GB, go ahead and split them using AVIDEMUX.
First, get and install the dvd+rw-tools from here:
http://fy.chalmers.se/~appro/linux/DVD+RW/tools/
The install requires you to:
1) untar/gunzip the source files
2) run "make"
3) run "make install"
After that, the tools should be installed. Once the tools are installed, load up a dual-layer disc and check your media:
dvd+rw-mediainfo /dev/hda
You'll get output similar to this:
[gagazote@computer hvirtual]# dvd+rw-mediainfo /dev/hda
INQUIRY: [_NEC ][DVD_RW ND-3500AG][2.16]
GET [CURRENT] CONFIGURATION:
Mounted Media: 2Bh, DVD+R Double Layer
Media ID: MKM/001
Current Write Speed: 6.1x1385=8467KB/s
Write Speed #0: 6.1x1385=8467KB/s
Write Speed #1: 5.1x1385=7056KB/s
Write Speed #2: 4.1x1385=5645KB/s
Write Speed #3: 3.1x1385=4234KB/s
Write Speed #4: 2.0x1385=2822KB/s
Write Speed #5: 1.0x1385=1411KB/s
GET [CURRENT] PERFORMANCE:
Write Performance: 4.0x1385=5540KB/s@[0 -> 4173824]
Speed Descriptor#0: 00/4173824 R@5.0x1385=6925KB/s W@4.0x1385=5540KB/s
Speed Descriptor#1: 00/4173824 R@5.0x1385=6925KB/s W@2.4x1385=3324KB/s
DVD+R DOUBLE LAYER BOUNDARY INFORMATION:
L0 Data Zone Capacity: 2086912*2KB, can still be set
READ DISC INFORMATION:
Disc status: blank
Number of Sessions: 1
State of Last Session: empty
Number of Tracks: 1
READ TRACK INFORMATION[#1]:
Track State: blank
Track Start Address: 0*2KB
Next Writable Address: 0*2KB
Free Blocks: 4173824*2KB
Track Size: 4173824*2KB
ROM Compatibility LBA: 262144
READ CAPACITY: 1*2048=2048
Then, burn your files:
growisofs -Z /dev/hda -R -J /mnt/videos/*
This command creates an ISO 9660 image of the directory "/mnt/videos" and writes it to a dual-layer DVD.
First, get and install the dvd+rw-tools from here:
http://fy.chalmers.se/~appro/linux/DVD+RW/tools/
The install requires you to:
1) untar/gunzip the source files
2) run "make"
3) run "make install"
After that, the tools should be installed. Once the tools are installed, load up a dual-layer disc and check your media:
dvd+rw-mediainfo /dev/hda
You'll get output similar to this:
[gagazote@computer hvirtual]# dvd+rw-mediainfo /dev/hda
INQUIRY: [_NEC ][DVD_RW ND-3500AG][2.16]
GET [CURRENT] CONFIGURATION:
Mounted Media: 2Bh, DVD+R Double Layer
Media ID: MKM/001
Current Write Speed: 6.1x1385=8467KB/s
Write Speed #0: 6.1x1385=8467KB/s
Write Speed #1: 5.1x1385=7056KB/s
Write Speed #2: 4.1x1385=5645KB/s
Write Speed #3: 3.1x1385=4234KB/s
Write Speed #4: 2.0x1385=2822KB/s
Write Speed #5: 1.0x1385=1411KB/s
GET [CURRENT] PERFORMANCE:
Write Performance: 4.0x1385=5540KB/s@[0 -> 4173824]
Speed Descriptor#0: 00/4173824 R@5.0x1385=6925KB/s W@4.0x1385=5540KB/s
Speed Descriptor#1: 00/4173824 R@5.0x1385=6925KB/s W@2.4x1385=3324KB/s
DVD+R DOUBLE LAYER BOUNDARY INFORMATION:
L0 Data Zone Capacity: 2086912*2KB, can still be set
READ DISC INFORMATION:
Disc status: blank
Number of Sessions: 1
State of Last Session: empty
Number of Tracks: 1
READ TRACK INFORMATION[#1]:
Track State: blank
Track Start Address: 0*2KB
Next Writable Address: 0*2KB
Free Blocks: 4173824*2KB
Track Size: 4173824*2KB
ROM Compatibility LBA: 262144
READ CAPACITY: 1*2048=2048
Then, burn your files:
growisofs -Z /dev/hda -R -J /mnt/videos/*
This command creates an ISO 9660 image of the directory "/mnt/videos" and writes it to a dual-layer DVD.
- -Z erases any previous contents
- -R include rockridge extensions
- -J include joliet extentions
Labels:
archiving,
backup,
burn,
command line,
dual layer,
dvd,
dvd+rw-mediainfo,
mpegts
If this post was useful to you..consider buying me a beer via PayPal!
Even a $1 Draft will keep the Mule happily working..and help pay for equipment upgrades!
Subscribe to:
Posts (Atom)
