Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-25-2004, 09:13 AM
|
#1
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Rep:
|
ImageMagick question
Hi folks,
FedoraCore2
===========
ImageMagick is completely new to me.
I'm searching for a software working as a desk/platform allowing scaned pictures/documents to be manupulated on it such as;
1) combining scaned pictures/documents as a book
2) typing notes/lines on pictures/documents
3) simple graphic editing
4) pages in the book can be resort, such as taking out page-2 putting it as page-10, etc.
5) save/export/print the book in pdf, png, ps, etc. format
Is ImageMagick the right tool for me? Any folk having experience on this tool please shed me some light.
I can evoke ImageMagick by running following command on console;
$ display logo:Untitled
But I could not locate scanner plugin there similar to 'Kooka'
TIA
B.R.
satimis
|
|
|
11-25-2004, 09:37 AM
|
#2
|
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994
Rep:
|
ImageMagick is great for converting images, and for batch processing of lots of images at once using scripts.
If you're interested in processing individual images, then the GNU Image Manipulator Program (GIMP) is an very strong graphical tool (try a freshmeat.net search), and it also allows you to acquire images from a scanner through SANE.
SANE is the technology used by Linux to acquire images from digital devices (scanners and some stills cameras); search for information on SANE if you want a command-line tool to handle this.
|
|
|
11-25-2004, 06:35 PM
|
#3
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Original Poster
Rep:
|
Hi rjlee,
Tks for your advice.
Quote:
If you're interested in processing individual images, then the GNU Image Manipulator Program (GIMP) is an very strong graphical tool (try a freshmeat.net search), and it also allows you to acquire images from a scanner through SANE.
|
I'm using GIMP to do this job with SANE scanning images/document. But GIMP is a heavy tool for this simple job. I also use 'convert' function of ImageMagick binding scanned images as book.
I'm searching for some simple tools on Linux World to do this job. On Windows there are many of them but I can't find their equivalent on Linux. Previously some folks suggested using ebook software. Neither I have tried nor I have knowledge on ebook software.
Futhermore do you know any pdf/ps tools spiced up with ImageMagick. TIA
B.R.
satimis
Last edited by satimis; 11-25-2004 at 06:40 PM.
|
|
|
11-27-2004, 06:23 PM
|
#4
|
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994
Rep:
|
Scribus is a good general-purpose drawing/layout utility.
Conversion to postscript is generally called “printing to a file” in Linux; most utilities will allow you to “print” out a postscript file (printer spoolers expect documents in postscript format).
ps2pdf and pdf2ps come as a part of ghostscript as standard and convert between postscript and portable document format.
ps2pdf, pdf2ps and all of the imagemagick commands support the use of a - on the command-line to mean “standard input” or “standard output” so it's quite easy to pipe them together:
Code:
ps2pdf saved.ps - | pdf2ps - - | ps2pdf - converted.pdf
(this converts saved.ps to PDF, converts it back into ps, then converts it back into PDF, saving the end result as converted.pdf. Just an example of pipeing; see the bash manpage for more.)
Last edited by rjlee; 11-27-2004 at 06:25 PM.
|
|
|
11-27-2004, 07:10 PM
|
#5
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Original Poster
Rep:
|
Hi rjlee,
Tks for your advice.
Scribus, ps2pdf and pdf2ps, etc. are all new to me. I'll have a look later.
My problem is;
If I have 100+ scanned documents in a directory which
is created for scanning, can I apply following
'convert' command line binding them as book.
$ convert ~/pathto/dir-scan/* book.pdf
instead of in 'dir-scan' directory applying
$ convert doc-001 doc-002 doc-003 (etc.) book.pdf
(doc-001 will become page-1, doc-002 page-2, doc-003
page-3, etc.)
If each document has its name, say aaa, bbb, ccc, etc.
then I have to make their names as doc-001-aaa,
doc-002-bbb, doc-003-ccc, etc.
Now if I want to place doc-003-ccc as page-1 and
doc-001-aaa as page-3 whether just changing;
doc-001-aaa as doc-003-aaa
and
doc-003-ccc as doc-001-ccc
The command 'convert' will detect them to do the job
automatically.
How about I just need to make doc-001-aaa as Page-50
and let the other pages pushed upward then there will
be lot of work. Is there any other way?
TIA
B.R.
satimis
|
|
|
11-28-2004, 05:59 AM
|
#6
|
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994
Rep:
|
convert will convert the images in the order in which they appear on the command-line.
When you glob multiple files together using * or ? escapes, the shell will extract the files in roughly alphabetical order (capital letters come before small letters, numbers before that and so on). It's the same order that you get with the command
Code:
ls -1 ~/pathto/dir-scan/*
So yes, you can swap the filenames to change the order that they appear in.
Moving page 50 to page 1 isn't too hard; you can just rename it as doc-001-aa (which will come before doc-001-aaa, so the other files will move down). However, this is rather hard if you want to keep the page number in the filename.
Just an idea, but another trick you can do, if you don't have any spaces or obscure punctuation in the filenames, is to make a list of the files in the order you want them to appear in, one file per line. Let's say this list is stored in the file “file.list”. You can then just put this list into the command-line using backticks:
Code:
convert `cat file.list` book.pdf
( cat just types out the contents of the file). This way, there's no reason to keep the page number in the filename (if you want to know which page an image occurs on, you can just search for it in the list file and read off the line number).
|
|
|
11-28-2004, 11:03 PM
|
#7
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Original Poster
Rep:
|
Hi rjlee,
Quote:
Just an idea, but another trick you can do, if you don't have any spaces or obscure punctuation in the filenames, is to make a list of the files in the order you want them to appear in, one file per line. Let's say this list is stored in the file “file.list”. You can then just put this list into the command-line using backticks:
Code:
convert `cat file.list` book.pdf
(cat just types out the contents of the file). This way, there's no reason to keep the page number in the filename (if you want to know which page an image occurs on, you can just search for it in the list file and read off the line number).
|
Noted with thanks
B.R.
satimis
|
|
|
All times are GMT -5. The time now is 07:06 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|