Initial import of new posts
This commit is contained in:
parent
e4bafbb361
commit
0e12688f04
391 changed files with 14594 additions and 0 deletions
21
_posts/2007-07-04-command-line-scanning.markdown
Normal file
21
_posts/2007-07-04-command-line-scanning.markdown
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
author: einar
|
||||
comments: true
|
||||
date: 2007-07-04 21:26:31+00:00
|
||||
layout: post
|
||||
slug: command-line-scanning
|
||||
title: Command line scanning
|
||||
wordpress_id: 269
|
||||
categories:
|
||||
- Linux
|
||||
---
|
||||
|
||||
Recently, I had to do a few scans with my old but trusty BenQ 640BU. Given that I could not use any GUI due to a [long-standing Feisty bug](https://bugs.launchpad.net/bugs/85488), I tried to settle for command line scanning with the scanimage command from [SANE](http://www.sane-project.org). The main problem is that scanimage only saves images in PNM or TIFF formats. I wanted to use JPEG or PNG, but apparently that looked impossible to do.
|
||||
|
||||
Instead, I found that scanimage sends its results to standard output, and also that ImageMagick can accept standard input as source file, it was easy to convert on the fly:
|
||||
|
||||
[code lang='c']
|
||||
scanimage --format pnm | convert -format png - test.png
|
||||
[/code]
|
||||
|
||||
"-" tells convert to use the standard input. Another great example of the power of the command line.
|
Reference in a new issue