Re: why does the output jpeg look not as good as shown on screen? [message #49767] |
Mon, 14 August 2006 23:59 |
Maarten[1]
Messages: 176 Registered: November 2005
|
Senior Member |
|
|
Benjamin Hornberger wrote:
> You can try to increase the quality level of the JPEG (QUALITY keyword
> to WRITE_JPEG), but if your image is more like a drawing than a
> photograph, you might be better off using a different graphics format
> like PNG (which uses lossless compression).
Or you can generate eps output, and use ghostscript to generate bitmaps
from that, which offers more fine-tuned control over the output quality
(aliasing for use on web-pages, etc).
For use in articles, I don't think there are reasons these days to use
anything but eps, given that the latest versions of Office can read
them. (Of course TeX can, and for science that is the best option, but
I digress).
Maarten
|
|
|
Re: why does the output jpeg look not as good as shown on screen? [message #49771 is a reply to message #49767] |
Mon, 14 August 2006 16:12  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
ltsmktip21@gmail.com writes:
> Using the following commands:
>
> tvimage,imageout,position=[0,0,1,1]
> a=tvrd(true=3)
> write_jpeg,'out.jpg',a,true=3
>
> when I use kuickshow to display the image, the saved image is not as
> clear as it is shown in the IDL plot winodw, it is kind of blurring and
> dimmer. Can one make a jpeg file which is identical to the one shown in
> the IDL plot window?
You could try setting QUALITY=100 on the WRITE_JPEG
command and eliminate any JPEG compression.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: why does the output jpeg look not as good as shown on screen? [message #49772 is a reply to message #49771] |
Mon, 14 August 2006 16:09  |
Benjamin Hornberger
Messages: 258 Registered: March 2004
|
Senior Member |
|
|
ltsmktip21@gmail.com wrote:
> Using the following commands:
>
> tvimage,imageout,position=[0,0,1,1]
> a=tvrd(true=3)
> write_jpeg,'out.jpg',a,true=3
>
> when I use kuickshow to display the image, the saved image is not as
> clear as it is shown in the IDL plot winodw, it is kind of blurring and
> dimmer. Can one make a jpeg file which is identical to the one shown in
> the IDL plot window?
>
I guess what you see is artifacts of the JPEG compression, which is a
lossy compression. These artifacts increase with the compression level
and are generally more pronounced for things like line plots, drawings,
large areas of constant color etc. as opposed to photographs.
You can try to increase the quality level of the JPEG (QUALITY keyword
to WRITE_JPEG), but if your image is more like a drawing than a
photograph, you might be better off using a different graphics format
like PNG (which uses lossless compression).
Benjamin
|
|
|