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

Home » Public Forums » archive » Re: plotting graphics for web pages
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: plotting graphics for web pages [message #60234] Sun, 11 May 2008 15:09 Go to next message
Mark[1] is currently offline  Mark[1]
Messages: 66
Registered: February 2008
Member
On May 12, 1:44 am, "tia...@gmail.com" <tia...@gmail.com> wrote:
> On May 10, 11:02 pm, russ <rlaybe...@hotmail.com> wrote:
> I use convert command of ImageMagik to convert the Postscript file to
> Jpeg format.

A couple of comments:

1) JPEG is suitable for photos of natural scenes, but for scientific
graphics with lines, sharp edges, solid colours, PNG is better.
ImageMagick will produce either.

2) One of the advantages of the ImageMagick convert command is that
you can use it to reduce the number of colours in the image, where
appropriate. I normally produce PNGs from IDL in 24-bit colour, but
often reduce them to 8-bit or 4-bit colour with ImageMagick
afterwards, if file size is an issue.
Re: plotting graphics for web pages [message #60236 is a reply to message #60234] Sun, 11 May 2008 06:44 Go to previous messageGo to next message
enod is currently offline  enod
Messages: 41
Registered: November 2004
Member
On May 10, 11:02 pm, russ <rlaybe...@hotmail.com> wrote:
> Hi
>
> I want to make my idl code do a plot to a file format that can be
> picked up by html.
>
> I tried set_plot,'ps' etc
>
> which creates the ps file ok that can be read into word, but if I
> reference this in the normal way in html
>
> <a href="http://www...etc" title="OUCE" class="logo"><img
> src="images1.jpg" alt="OUCE" /></a>
>
> then it doesnt show when opeing the file in explorer.
>
> any ideas?
>
> thanks
>
> russ

I use convert command of ImageMagik to convert the Postscript file to
Jpeg format.


Tian
Re: plotting graphics for web pages [message #60241 is a reply to message #60236] Sat, 10 May 2008 10:32 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
russ writes:

> I want to make my idl code do a plot to a file format that can be
> picked up by html.
>
> I tried set_plot,'ps' etc
>
> which creates the ps file ok that can be read into word, but if I
> reference this in the normal way in html
>
> <a href="http://www...etc" title="OUCE" class="logo"><img
> src="images1.jpg" alt="OUCE" /></a>
>
> then it doesnt show when opeing the file in explorer.
>
> any ideas?

I make all the figures for my web page by just
running the program and displaying things in
an IDL graphics window. Then I type this to
save the file (usually as a PNG file):

IDL> void = TVRead(/PNG); or /JPEG, /TIFF, etc.

You can find TVREAD here:

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

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: plotting graphics for web pages [message #60245 is a reply to message #60241] Sat, 10 May 2008 09:04 Go to previous messageGo to next message
russ[1] is currently offline  russ[1]
Messages: 8
Registered: April 2008
Junior Member
On 10 May, 16:32, Justus Skorps <ju...@gmx.de> wrote:
> when I need pics for webpages I plot to z buffer, then grab the image
> with tv and save it as png...not the best method but works fine enough
> for me..

that's fantastic, works a treat

thanks

russ
Re: plotting graphics for web pages [message #60246 is a reply to message #60245] Sat, 10 May 2008 08:43 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On May 10, 10:32 am, Justus Skorps <ju...@gmx.de> wrote:
> when I need pics for webpages I plot to z buffer, then grab the image
> with tv and save it as png...not the best method but works fine enough
> for me..

I don't know, sounds like the best method to me 8^)
Re: plotting graphics for web pages [message #60247 is a reply to message #60246] Sat, 10 May 2008 08:32 Go to previous messageGo to next message
Justus Skorps is currently offline  Justus Skorps
Messages: 20
Registered: April 2007
Junior Member
when I need pics for webpages I plot to z buffer, then grab the image
with tv and save it as png...not the best method but works fine enough
for me..
Re: plotting graphics for web pages [message #60331 is a reply to message #60234] Mon, 19 May 2008 19:31 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mark writes:

> 2) One of the advantages of the ImageMagick convert command is that
> you can use it to reduce the number of colours in the image, where
> appropriate. I normally produce PNGs from IDL in 24-bit colour, but
> often reduce them to 8-bit or 4-bit colour with ImageMagick
> afterwards, if file size is an issue.

Ok, ImageMagick is terrific! But the documentation is typical
of free software. How exactly does one reduce the color?
I'm writing an article. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: plotting graphics for web pages [message #60339 is a reply to message #60236] Mon, 19 May 2008 13:29 Go to previous messageGo to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
tianyf@gmail.com wrote:
> On May 10, 11:02 pm, russ <rlaybe...@hotmail.com> wrote:
>> Hi
>>
>> I want to make my idl code do a plot to a file format that can be
>> picked up by html.
>>
>> I tried set_plot,'ps' etc
>>
>> which creates the ps file ok that can be read into word, but if I
>> reference this in the normal way in html
>>
>> <a href="http://www...etc" title="OUCE" class="logo"><img
>> src="images1.jpg" alt="OUCE" /></a>
>>
>> then it doesnt show when opeing the file in explorer.
>>
>> any ideas?
>>
>> thanks
>>
>> russ
>
> I use convert command of ImageMagik to convert the Postscript file to
> Jpeg format.

I do the same thing except:

1) I use png, rather than jpeg, files

2) I do a
device, scale_factor=2.0
for PS output so that the resultant ps->png conversion doesn't
produce teeny pictures.

Grabbing IDL output from screen (direct graphics at least) leaves you hostage to blechy fonts.

cheers,

paulv
Re: plotting graphics for web pages [message #60441 is a reply to message #60331] Wed, 21 May 2008 15:31 Go to previous message
Mark[1] is currently offline  Mark[1]
Messages: 66
Registered: February 2008
Member
On May 20, 2:31 pm, David Fanning <n...@dfanning.com> wrote:
> Ok, ImageMagick is terrific! But the documentation is typical
> of free software. How exactly does one reduce the color?
> I'm writing an article. :-)

To the best of my recollection, use the option "-colors 256" or "-
colors 16".
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: DLM 32/64 bits
Next Topic: Which version can I install on Redhat 8.0

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

Current Time: Wed Oct 08 15:12:47 PDT 2025

Total time taken to generate the page: 0.31103 seconds