Page 1 of 1
Getting higher resolution with the montage command
Posted: 2008-02-27T13:39:52-07:00
by starsandspice
I am trying to montage together two images into a single file. The command I use is:
montage -tile 2x1 file1.ps file2.ps result.ps
When I look at result.ps, though, the image is fuzzy and the text is blurred even though the input files are high resolution files.
I've tried lots of different compressions and resizing, but nothing has helped make the result.ps image clearer. Can anybody help me with this??
Re: Getting higher resolution with the montage command
Posted: 2008-02-27T14:00:52-07:00
by magick
Try this command:
- convert -density 400 file1.ps file2.ps +append -resize 25% result.ps
Keep in mind that ImageMagick rasterizes your Postscript files which may not be what you want.
Re: Getting higher resolution with the montage command
Posted: 2008-02-27T14:27:56-07:00
by starsandspice
This works ok with convert - the resolution is still lower than in the input files, but at least the result is readable. Is there any way to do this within montage, though? If I add the -density 400 and -resize 25% options to my command, I get a very tiny image and I can't tell if the resolution has actually improved.
I was simplifying things a little in my first post, because I am actually montaging 15 images together in a particular sequence. I need montage because I can format the result with the -tile command. (The resolution is a problem regardless of the number of images.)
This may not be the appropriate place to ask this, but is there another software or program that will do something similar to montage but without rasterizing the postscript files?
Re: Getting higher resolution with the montage command
Posted: 2008-03-07T13:43:08-07:00
by starsandspice
As an update, I tried converting my images to high resolution jpegs before using the montage command. (I used the convert command as magick recommended.) But this still results in fuzzy images! There has to be a way to use montage to combine high-resolution images, whether in jpeg or postscript, I just can't seem to figure it out.
Re: Getting higher resolution with the montage command
Posted: 2008-03-07T21:51:04-07:00
by fmw42
JPEG is a lossy format. You need to convert them to PNG or some other format that will not loose quality due to compression and make your montage in that format, but not JPEG. Or tell IM to use -quality 100 with the JPG output.
see
http://www.imagemagick.org/script/comma ... hp#quality
Re: Getting higher resolution with the montage command
Posted: 2008-03-08T12:31:43-07:00
by starsandspice
Ok, I will try that.
(Clearly I'm a newbie at this; I don't usually work with image processing.)
Thanks!
Re: Getting higher resolution with the montage command
Posted: 2008-03-14T04:08:33-07:00
by anthony
As Magick pointed out at the begining, you may not really want to use IM at all as you are converting Postscript Images to Postscript images.
See IM Examples,
A word about Vector Image Formats
http://imagemagick.org/Usage/formats/#vector
Re: Getting higher resolution with the montage command
Posted: 2008-03-14T07:15:40-07:00
by starsandspice
You are correct, Magick did point that out, but since I don't know any alternative to using ImageMagick, I kept using it and hoping to improve the image quality. (You will note that I asked in my second post if there were alternative programs to ImageMagick for this type of processing.)
Interestingly enough, even if I convert the postscript images to high-quality jpegs and montage my images into another jpeg using "-quality 100", I still get fuzzy images. This may have to do with the "-density" command, but I'm not sure. Anyway, thank you for the link, I will take a look at VectorSection and see if I can do a montage of postscript images using that instead.
Re: Getting higher resolution with the montage command
Posted: 2008-03-15T05:12:01-07:00
by anthony
I gather that the images are not being resize smaller when you only use JPEG?
AT want sort of pixel sizes are the images, for both input and output?
Re: Getting higher resolution with the montage command
Posted: 2008-03-17T14:36:48-07:00
by starsandspice
The input images are 612x792. The output image are 256x126. This is if I just do a simple montage command:
montage -quality 100 inputfile1.jpg inputfile2.jpg outputfile.jpg
This confuses me because I thought that -quality 100 keeps the image resolution the same because its the least amount of compression?
Should I be resizing the images? Or doing something with -density?
Thanks!
~ M
Re: Getting higher resolution with the montage command
Posted: 2008-03-17T17:35:35-07:00
by anthony
The -density of JPEG images only become involved when the image is being used on some other device that has 'real world' density.
That is -density is basically ignored (but saved) on JPEG input (though whether montage copys it to the output image is another matter). The saved value or user setting is however recorded in a JPEG output image in the standard JPEG way.
However photoshop uses its own completely separate density information that it stores in JPEG images in a photoshop specific profile. IM does not read or understand this profile.
You can see the density the IM is working with or producing using command identify -verbose
Re: Getting higher resolution with the montage command
Posted: 2008-03-17T17:41:15-07:00
by magick
Anthony is correct for the most part, however, if the JPEG image includes an EXIF profile, recent versions of ImageMagick will update the resolution information in the profile.
Re: Getting higher resolution with the montage command
Posted: 2008-03-17T17:42:10-07:00
by anthony
Magick is this the profile that Photoshop uses?