comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: write JPEG
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: write JPEG [message #23365 is a reply to message #23362] Mon, 15 January 2001 07:10 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Michael Prinzler (michael.prinzler@tu-cottbus.de) writes:

> How can I specify the resolution 72dpi (default) to 300 dpi while storing an
> image with write_jpeg?

You can't specify the resolution when you write the file,
but you can save the size of the image you write. You
don't say what kind of display you are using, so I'll
use as an example TVREAD from my web page, which doesn't
care.

http://www.dfanning.com/programs/tvread.pro

Read the image from the display window:

image = TVREAD()

I presume this is a 24-bit image (I.e., that you are using
a 24-bit graphics card), but if it is not, you have to make
it one, since this is what WRITE_JPEG expects. (If you need
help, there are articles on my web page that should you how
to do this. For example: http:/www.dfanning.com/tips/jpeg.html.)

So the factors we are looking for, assuming a pixel
interleaved image, are:

s = Size(image, /Dimensions)
newx = Round(300.0 * s[1] / 72)
newy = Round(300.0 * s[2] / 72)

So,

highResImage = Congrid(image, 3, newx, newy, /Interp)

And then write it:

Write_JPEG, 'myfile.jpg', highResImage, True=1

> and (if you are veeery kind) :
> what means "No application/appled is present for use with LIVE_EXPORT."?
> This error message appears, if I start this (test)-code :
> pro live
> device,retain=2,decomposed=0
> window,1, Title = 'test'
> a=dist(512)
> tv,a
> live_export,Filename='test'
> wdelete,1
> end

Don't know. I don't use the Live Tools. And I can't make
out from the program exactly what it is you are trying
to do. :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Issuing a print command
Next Topic: Re: reading wav files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 00:18:34 PDT 2025

Total time taken to generate the page: 1.99811 seconds