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

Home » Public Forums » archive » ImageMagick option not showing up in Coyote Graphics window
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
ImageMagick option not showing up in Coyote Graphics window [message #90354] Wed, 25 February 2015 13:15 Go to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
Hi everyone,
I have an issue that I'm sure revolves around some combination of versions of Ghostscript and ImageMagick, but I just can't seem to figure it out.

The issue:
I was failing at using cgControl to output hard copy plots (e.g. cgControl, output='nameplot.pdf') so I updated IM, GS, CoyoteGraphics, and replaced my libz file with the older, IM-compatible one (as described here: https://www.idlcoyote.com/graphics_tips/macspawnim.php).

The outcome:
The cgControl output to .png, .pdf, etc now works just fine (YAY!) but I've now lost the "File->Save Window As->Raster Image File via ImageMagick" option in the CG window (Boo).

Question:
Does anyone know where that option went?? And/or what I can do to get it back.


Current config:
Mac OS 10.8.5
IDL Version 8.2.2
GPL Ghostscript 9.10 (2013-08-30)
ImageMagick 6.9.0-0 Q16 x86_64 2015-02-10
libz.1.2.3.dylib file is in bin/bin.darwin.x86_64/
Re: ImageMagick option not showing up in Coyote Graphics window [message #90356 is a reply to message #90354] Wed, 25 February 2015 13:25 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> I have an issue that I'm sure revolves around some combination of versions of Ghostscript and ImageMagick, but I just can't seem to figure it out.
>
> The issue:
> I was failing at using cgControl to output hard copy plots (e.g. cgControl, output='nameplot.pdf') so I updated IM, GS, CoyoteGraphics, and replaced my libz file with the older, IM-compatible one (as described here: https://www.idlcoyote.com/graphics_tips/macspawnim.php).
>
> The outcome:
> The cgControl output to .png, .pdf, etc now works just fine (YAY!) but I've now lost the "File->Save Window As->Raster Image File via ImageMagick" option in the CG window (Boo).
>
> Question:
> Does anyone know where that option went?? And/or what I can do to get it back.

The option disappears if I'm confident you can make the files correctly.
When you choose the Make Raster File option, it will do so through
ImageMagick, as if by, well, magic. ;-)

There is no need to make raster files any other way, since any other way
sucks. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90358 is a reply to message #90356] Wed, 25 February 2015 13:38 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
Ok...interesting. So then next question!
Ever since I ran all the updates, and "via ImageMagick" disappeared, the text in all the pdf files I've created is gray-ish instead of black. And if you zoom in on the text you can see the black text is covered in white lines that make it appear gray when zoomed out. I figured it was something with the ImageMagick not going right, but maybe not?
Re: ImageMagick option not showing up in Coyote Graphics window [message #90359 is a reply to message #90358] Wed, 25 February 2015 13:46 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> Ok...interesting. So then next question!
> Ever since I ran all the updates, and "via ImageMagick" disappeared, the text in all the pdf files I've created is gray-ish instead of black. And if you zoom in on the text you can see the black text is covered in white lines that make it appear gray when zoomed out. I figured it was something with the ImageMagick not going right, but maybe not?

I think it is more likely that it is a problem with your Preview
application:

http://www.idlcoyote.com/ps_tips/maccolors.php
http://www.idlcoyote.com/ps_tips/blurred.html
http://www.idlcoyote.com/ps_tips/psstripes.html

You may have to ask for Mac-specific help here, though. I can't help you
with that. :-)

I will say, that I've never heard of this problem, though.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90360 is a reply to message #90359] Wed, 25 February 2015 18:21 Go to previous messageGo to next message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Wednesday, February 25, 2015 at 3:47:01 PM UTC-6, David Fanning wrote:
> allison jaynes writes:
>
>> Ok...interesting. So then next question!
>> Ever since I ran all the updates, and "via ImageMagick" disappeared, the text in all the pdf files I've created is gray-ish instead of black. And if you zoom in on the text you can see the black text is covered in white lines that make it appear gray when zoomed out. I figured it was something with the ImageMagick not going right, but maybe not?
>
> I think it is more likely that it is a problem with your Preview
> application:
>

Agree with David. Most likely there's nothing wrong with the file, but how it's rendered.

Do you have a MWE to test?
Re: ImageMagick option not showing up in Coyote Graphics window [message #90365 is a reply to message #90360] Thu, 26 February 2015 08:24 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Wednesday, February 25, 2015 at 7:21:26 PM UTC-7, Phillip Bitzer wrote:
> On Wednesday, February 25, 2015 at 3:47:01 PM UTC-6, David Fanning wrote:
>> allison jaynes writes:
>>
>>> Ok...interesting. So then next question!
>>> Ever since I ran all the updates, and "via ImageMagick" disappeared, the text in all the pdf files I've created is gray-ish instead of black. And if you zoom in on the text you can see the black text is covered in white lines that make it appear gray when zoomed out. I figured it was something with the ImageMagick not going right, but maybe not?
>>
>> I think it is more likely that it is a problem with your Preview
>> application:
>>
>
> Agree with David. Most likely there's nothing wrong with the file, but how it's rendered.
>
> Do you have a MWE to test?

So I have produced text with each of my two machines.
They are both Macs and were both identically created with the following code:

cgwindow, wxsize=350,wysize=150,'cgtext',0.5,0.5, 'This text looks funny.',charsize=4.0, alignment=0.5
cgcontrol, output='~/Desktop/funny.pdf'

Here is the one that looks funny - created after updating IM, GS and CG:
https://www.dropbox.com/s/w5qo4qqta75tgcl/funny.pdf?dl=0

Here is the one from another computer which was not recently updated. This is how all my text used to look before updating the other day:
https://www.dropbox.com/s/3oucoag7uvegj4p/not_funny.pdf?dl=0


The funny one looks the same whether I open the .pdf in Preview, Adobe, GSViewer or what have you. The difference is more apparent when you zoom way in on one letter or two. See those white lines?

Any ideas?
Re: ImageMagick option not showing up in Coyote Graphics window [message #90366 is a reply to message #90365] Thu, 26 February 2015 08:49 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> So I have produced text with each of my two machines.
> They are both Macs and were both identically created with the following code:
>
> cgwindow, wxsize=350,wysize=150,'cgtext',0.5,0.5, 'This text looks funny.',charsize=4.0, alignment=0.5
> cgcontrol, output='~/Desktop/funny.pdf'
>
> Here is the one that looks funny - created after updating IM, GS and CG:
> https://www.dropbox.com/s/w5qo4qqta75tgcl/funny.pdf?dl=0
>
> Here is the one from another computer which was not recently updated. This is how all my text used to look before updating the other day:
> https://www.dropbox.com/s/3oucoag7uvegj4p/not_funny.pdf?dl=0
>
>
> The funny one looks the same whether I open the .pdf in Preview, Adobe, GSViewer or what have you. The difference is more apparent when you zoom way in on one letter or two. See those white lines?
>
> Any ideas?

Anti-aliasing.

http://idlcoyote.com/ps_tips/psstripes.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90367 is a reply to message #90365] Thu, 26 February 2015 09:36 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
Hello,

Huh. I see it too in your generated outputs, and I'm running RHEL6 and
display using okular (same when I use acroread too).

I zoomed in 2400% and it's quite clear that the "ghost" lines are
connecting the vertices of the polygon that forms the letter. The letter
"o" has way more lines than the letter "l". The letter "t" is waaaaay
out there!

Weird. It does look like the different versions of the applications are
doing something differently.

The versions without the lines produces a *much* smoother letter, i.e.
the letter "o" in the "not-funny" version is completely smooth even when
zoomed in at 6400%. In the "funny" version the same letter looks quite
blocky.

Maybe the updated versions of the applications were built with a
memory-saving switch or something? (waving hands about here looking for
explanation).

cheers,

paulv


On 02/26/15 11:24, allison jaynes wrote:
> On Wednesday, February 25, 2015 at 7:21:26 PM UTC-7, Phillip Bitzer
> wrote:
>> On Wednesday, February 25, 2015 at 3:47:01 PM UTC-6, David Fanning
>> wrote:
>>> allison jaynes writes:
>>>
>>>> Ok...interesting. So then next question! Ever since I ran all
>>>> the updates, and "via ImageMagick" disappeared, the text in all
>>>> the pdf files I've created is gray-ish instead of black. And if
>>>> you zoom in on the text you can see the black text is covered
>>>> in white lines that make it appear gray when zoomed out. I
>>>> figured it was something with the ImageMagick not going right,
>>>> but maybe not?
>>>
>>> I think it is more likely that it is a problem with your Preview
>>> application:
>>>
>>
>> Agree with David. Most likely there's nothing wrong with the file,
>> but how it's rendered.
>>
>> Do you have a MWE to test?
>
> So I have produced text with each of my two machines. They are both
> Macs and were both identically created with the following code:
>
> cgwindow, wxsize=350,wysize=150,'cgtext',0.5,0.5, 'This text looks
> funny.',charsize=4.0, alignment=0.5 cgcontrol,
> output='~/Desktop/funny.pdf'
>
> Here is the one that looks funny - created after updating IM, GS and
> CG: https://www.dropbox.com/s/w5qo4qqta75tgcl/funny.pdf?dl=0
>
> Here is the one from another computer which was not recently updated.
> This is how all my text used to look before updating the other day:
> https://www.dropbox.com/s/3oucoag7uvegj4p/not_funny.pdf?dl=0
>
>
> The funny one looks the same whether I open the .pdf in Preview,
> Adobe, GSViewer or what have you. The difference is more apparent
> when you zoom way in on one letter or two. See those white lines?
>
> Any ideas?
>
Re: ImageMagick option not showing up in Coyote Graphics window [message #90368 is a reply to message #90367] Thu, 26 February 2015 09:41 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> Maybe the updated versions of the applications were built with a
> memory-saving switch or something? (waving hands about here looking for
> explanation).

If I had some assurances the anti-aliasing theory had been addressed, I
would be looking for alternate explanations, too. :-)

But, since that has solved all the "scratchy line" problems to date, I'm
holding off.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90369 is a reply to message #90368] Thu, 26 February 2015 12:26 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Thursday, February 26, 2015 at 10:41:36 AM UTC-7, David Fanning wrote:
> Paul van Delst writes:
>
>> Maybe the updated versions of the applications were built with a
>> memory-saving switch or something? (waving hands about here looking for
>> explanation).
>
> If I had some assurances the anti-aliasing theory had been addressed, I
> would be looking for alternate explanations, too. :-)
>
> But, since that has solved all the "scratchy line" problems to date, I'm
> holding off.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

If I disable smoothing in Preview, the text looks quite pixelated which is less preferable to the scratchy white lines.

I'm just more curious why updating the dependencies caused a change in the way the .pdf is created. Two days ago, my text looked great with no white lines. Serves me right for updating. :-)
Re: ImageMagick option not showing up in Coyote Graphics window [message #90370 is a reply to message #90369] Thu, 26 February 2015 12:39 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> If I disable smoothing in Preview, the text looks quite pixelated which is less preferable to the scratchy white lines.
>
> I'm just more curious why updating the dependencies caused a change in the way the .pdf is created. Two days ago, my text looked great with no white lines. Serves me right for updating. :-)

What versions of Ghostscript, ImageMagick, and IDL are you using? Have
you tried setting the +antialias switch on the ImageMagick convert
command? Have you tried just making a PostScript file and using
ImageMagick or another Mac tool to turn the PostScript files into a
raster or PDF file?

How exactly are you creating your files? Have you tried creating them
other ways?

Still lots of possibilities. Do you have code that can produce a file
that exhibits the problem, so we can test it?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90375 is a reply to message #90370] Thu, 26 February 2015 14:45 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Thursday, February 26, 2015 at 1:40:00 PM UTC-7, David Fanning wrote:
> allison jaynes writes:
>
>> If I disable smoothing in Preview, the text looks quite pixelated which is less preferable to the scratchy white lines.
>>
>> I'm just more curious why updating the dependencies caused a change in the way the .pdf is created. Two days ago, my text looked great with no white lines. Serves me right for updating. :-)
>
> What versions of Ghostscript, ImageMagick, and IDL are you using? Have
> you tried setting the +antialias switch on the ImageMagick convert
> command? Have you tried just making a PostScript file and using
> ImageMagick or another Mac tool to turn the PostScript files into a
> raster or PDF file?
>
> How exactly are you creating your files? Have you tried creating them
> other ways?
>
> Still lots of possibilities. Do you have code that can produce a file
> that exhibits the problem, so we can test it?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Using the code I sent earlier, just creating text in a graphics window, I can either print to hard copy using cgControl or I can Save ->PDF file in the CG window. Either way, I get the white lines on the updated computer. It is running the configuration I posted in the OP.

On the other computer, which is running ImageMagick 6.8.0-7 2013-03-19 and Ghostscript 9.0, I get no white lines.

I'm not sure what happens if I go through and do a .ps and then convert via ImageMagick - was hoping to have all my code do what it always did: output plots to hard copy automatically.

Anyway, I'll try downgrading to earlier versions of IM and GS via macports and see if that fixes everything. Thanks!
Re: ImageMagick option not showing up in Coyote Graphics window [message #90394 is a reply to message #90375] Fri, 27 February 2015 13:42 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Thursday, February 26, 2015 at 3:45:57 PM UTC-7, allison jaynes wrote:
> On Thursday, February 26, 2015 at 1:40:00 PM UTC-7, David Fanning wrote:
>> allison jaynes writes:
>>
>>> If I disable smoothing in Preview, the text looks quite pixelated which is less preferable to the scratchy white lines.
>>>
>>> I'm just more curious why updating the dependencies caused a change in the way the .pdf is created. Two days ago, my text looked great with no white lines. Serves me right for updating. :-)
>>
>> What versions of Ghostscript, ImageMagick, and IDL are you using? Have
>> you tried setting the +antialias switch on the ImageMagick convert
>> command? Have you tried just making a PostScript file and using
>> ImageMagick or another Mac tool to turn the PostScript files into a
>> raster or PDF file?
>>
>> How exactly are you creating your files? Have you tried creating them
>> other ways?
>>
>> Still lots of possibilities. Do you have code that can produce a file
>> that exhibits the problem, so we can test it?
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
>
> Using the code I sent earlier, just creating text in a graphics window, I can either print to hard copy using cgControl or I can Save ->PDF file in the CG window. Either way, I get the white lines on the updated computer. It is running the configuration I posted in the OP.
>
> On the other computer, which is running ImageMagick 6.8.0-7 2013-03-19 and Ghostscript 9.0, I get no white lines.
>
> I'm not sure what happens if I go through and do a .ps and then convert via ImageMagick - was hoping to have all my code do what it always did: output plots to hard copy automatically.
>
> Anyway, I'll try downgrading to earlier versions of IM and GS via macports and see if that fixes everything. Thanks!

Through macports and subversion, I was able to downgrade IM to version 6.8.0 and GS to 9.4 (but all the older builds failed for some reason). Problem persists. Scratchy white lines still visible. Losing hope...

If anyone has thoughts on getting older Ghostscript versions to work, I'll try that. Otherwise, I may have to start learning python.
Re: ImageMagick option not showing up in Coyote Graphics window [message #90398 is a reply to message #90394] Fri, 27 February 2015 14:12 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> If anyone has thoughts on getting older Ghostscript versions to work, I'll try that. Otherwise, I may have to start learning python.

Might be worth spending an hour with the ImageMagick documentation
before you spend two years learning Python. Just saying...

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90399 is a reply to message #90368] Fri, 27 February 2015 15:09 Go to previous messageGo to next message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Thursday, February 26, 2015 at 11:41:36 AM UTC-6, David Fanning wrote:
>
> If I had some assurances the anti-aliasing theory had been addressed, I
> would be looking for alternate explanations, too. :-)
>
> Cheers,
>
> David
> --

OK, I'm leaning toward a font thing. Consider this:

cgWindow
cgText, 0.5, 0.5, 'Is this ugly?', COLOR='black', /NORMAL, /ADD, ALIGN=.5, CHARSIZE=10
cgControl, OUTPUT='test.pdf', PS_DELETE=0 ;don't delete the PS file....
cgControl, /DESTROY

cgPS_OPEN, 'test2.pdf', TT_FONT='Helvetica'
cgText, 0.5, 0.5, 'Is this ugly?', COLOR='black', /NORMAL, ALIGN=.5, CHARSIZE=10
cgPS_CLOSE

Leave off the TT_FONT='Helvetica' in the second example, and the text is fine. Looks like the text in the PS file also has this issue, so I don't think it's a GS/ImageMagick issue.

It'll be a couple days before I can roll up my sleeves and figure out what's happening, but perhaps somehow forcing the use of hardware fonts with cgControl will help in the meantime. (Although setting PS_FONT=0 in the call to cgControl doesn't seem to work.)

Current config:
Mac OS 10.9.5
IDL Version 8.2.2
GPL Ghostscript 9.07 (2013-02-14)
ImageMagick 6.8.3-3 2013-02-21
Re: ImageMagick option not showing up in Coyote Graphics window [message #90400 is a reply to message #90399] Fri, 27 February 2015 15:34 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Phillip Bitzer writes:

>
> On Thursday, February 26, 2015 at 11:41:36 AM UTC-6, David Fanning wrote:
>>
>> If I had some assurances the anti-aliasing theory had been addressed, I
>> would be looking for alternate explanations, too. :-)
>>
>> Cheers,
>>
>> David
>> --
>
> OK, I'm leaning toward a font thing. Consider this:
>
> cgWindow
> cgText, 0.5, 0.5, 'Is this ugly?', COLOR='black', /NORMAL, /ADD, ALIGN=.5, CHARSIZE=10
> cgControl, OUTPUT='test.pdf', PS_DELETE=0 ;don't delete the PS file....
> cgControl, /DESTROY
>
> cgPS_OPEN, 'test2.pdf', TT_FONT='Helvetica'
> cgText, 0.5, 0.5, 'Is this ugly?', COLOR='black', /NORMAL, ALIGN=.5, CHARSIZE=10
> cgPS_CLOSE
>
> Leave off the TT_FONT='Helvetica' in the second example, and the text is fine. Looks like the text in the PS file also has this issue, so I don't think it's a GS/ImageMagick issue.
>
> It'll be a couple days before I can roll up my sleeves and figure out what's happening, but perhaps somehow forcing the use of hardware fonts with cgControl will help in the meantime. (Although setting PS_FONT=0 in the call to cgControl doesn't seem to work.)
>
> Current config:
> Mac OS 10.9.5
> IDL Version 8.2.2
> GPL Ghostscript 9.07 (2013-02-14)
> ImageMagick 6.8.3-3 2013-02-21

True-type fonts (sometimes called Outline fonts) are always polygon
filled fonts. I presume drawing the (many!) polygons is what causes the
"scratches.' (I'm not sure at which point anti-aliasing enters into the
equation.) Hardware fonts (always the default when creating PostScript
output with Coyote Graphics routines, unless you tell me something
different) are not polygon filled, so presumably wouldn't be subject to
scratches. I'm using IDL version 8.2.3 and I haven't noticed anything
funny about the PostScript files when using True-Type fonts. Nor am I
aware of any change to the PostScript device that could account for
this.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90401 is a reply to message #90400] Fri, 27 February 2015 15:45 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> I'm using IDL version 8.2.3 and I haven't noticed anything
> funny about the PostScript files when using True-Type fonts

Oh, I take that back. When I zoom in VERY close, I can see the
individual polygons that make up the text. If I squint, it looks like
scratches. Humm. Don't know. Maybe that *is* an IDL problem.

Cheers,

David

P.S. I do have to zoom in a fair amount to see this.

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90403 is a reply to message #90401] Fri, 27 February 2015 16:22 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Friday, February 27, 2015 at 4:45:15 PM UTC-7, David Fanning wrote:
> David Fanning writes:
>
>> I'm using IDL version 8.2.3 and I haven't noticed anything
>> funny about the PostScript files when using True-Type fonts
>
> Oh, I take that back. When I zoom in VERY close, I can see the
> individual polygons that make up the text. If I squint, it looks like
> scratches. Humm. Don't know. Maybe that *is* an IDL problem.
>
> Cheers,
>
> David
>
> P.S. I do have to zoom in a fair amount to see this.
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Yes, you have to zoom in like 1000% to see the scratches individually, but even zoomed out to normal size, the fonts look not fully black and 'thin' in places.

I wasn't thinking I was using TT fonts, but maybe I am inadvertently? I'm getting snowed in here in CO again this weekend so I'll play around with this some more.
Re: ImageMagick option not showing up in Coyote Graphics window [message #90438 is a reply to message #90403] Mon, 02 March 2015 15:53 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Friday, February 27, 2015 at 5:22:54 PM UTC-7, allison jaynes wrote:
> On Friday, February 27, 2015 at 4:45:15 PM UTC-7, David Fanning wrote:
>> David Fanning writes:
>>
>>> I'm using IDL version 8.2.3 and I haven't noticed anything
>>> funny about the PostScript files when using True-Type fonts
>>
>> Oh, I take that back. When I zoom in VERY close, I can see the
>> individual polygons that make up the text. If I squint, it looks like
>> scratches. Humm. Don't know. Maybe that *is* an IDL problem.
>>
>> Cheers,
>>
>> David
>>
>> P.S. I do have to zoom in a fair amount to see this.
>>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
>
> Yes, you have to zoom in like 1000% to see the scratches individually, but even zoomed out to normal size, the fonts look not fully black and 'thin' in places.
>
> I wasn't thinking I was using TT fonts, but maybe I am inadvertently? I'm getting snowed in here in CO again this weekend so I'll play around with this some more.

I tried output with cgControl using:
1) PS_FONT=0
2) PS_FONT=1
3) PS_TT_FONT='Times'
4) PS_TT_FONT='Helvetica'

All the same - all have the white lines.
Plot titles come out the same as using cgText, predictably.

But the tickmark labels are fine! If you use xtickname to give text to the tickmarks, they have NO white lines.

Is this a clue?
Re: ImageMagick option not showing up in Coyote Graphics window [message #90439 is a reply to message #90438] Mon, 02 March 2015 15:56 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> I tried output with cgControl using:
> 1) PS_FONT=0
> 2) PS_FONT=1
> 3) PS_TT_FONT='Times'
> 4) PS_TT_FONT='Helvetica'
>
> All the same - all have the white lines.
> Plot titles come out the same as using cgText, predictably.
>
> But the tickmark labels are fine! If you use xtickname to give text to the tickmarks, they have NO white lines.
>
> Is this a clue?

Not to me, it isn't. :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90440 is a reply to message #90438] Mon, 02 March 2015 16:25 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> I tried output with cgControl using:
> 1) PS_FONT=0
> 2) PS_FONT=1
> 3) PS_TT_FONT='Times'
> 4) PS_TT_FONT='Helvetica'
>
> All the same - all have the white lines.
> Plot titles come out the same as using cgText, predictably.
>
> But the tickmark labels are fine! If you use xtickname to give text to the tickmarks, they have NO white lines.
>
> Is this a clue?

On my Windows 7 machine (all updates), with IDL 8.2.3, I run this
command:

IDL> cgplot, cgdemodata(1), Title='This is a Long Title', $
XTitle='This is Another LONG Title', $
YTitle='And Still Another Tiitle', $
Font=0, Output='test_hardware.ps'

I'm viewing the PostScript files in GSView 5.0 at a very high
magnification (at least 300 percent).

If I set FONT=0, I see no evidence of lines. If I set FONT=1 (with a
Times True-Type font selected), I see evidence of lines in the Plot
titles, including the X and Y titles, but not on the number annotations
for the axes.

If I set FONT=0, and turn anti-aliasing on in the viewer, the text is
smooth. If I turn it off, the text is jagged about the boundaries, as I
expect.

If I set FONT=1, then the output (although it has lines from the
polygons that made up the title fonts), shows no effect with anti-
aliasing on or off. Also, exactly what I would expect.

The lines (or not) from the PostScript file is carried over to the PDF
file when I create that from the PostScript file.

If I set FONT=1 and render in 24-bit color in the PostScript device,
there is no difference from doing this in 8-bit color.

If I set FONT=1, LANGUAGE_LEVEL=2, DECOMPOSED=[0 or 1], there is no
difference in output.

Any clues there? :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90472 is a reply to message #90440] Tue, 03 March 2015 14:22 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Monday, March 2, 2015 at 5:25:53 PM UTC-7, David Fanning wrote:
> allison jaynes writes:
>
>> I tried output with cgControl using:
>> 1) PS_FONT=0
>> 2) PS_FONT=1
>> 3) PS_TT_FONT='Times'
>> 4) PS_TT_FONT='Helvetica'
>>
>> All the same - all have the white lines.
>> Plot titles come out the same as using cgText, predictably.
>>
>> But the tickmark labels are fine! If you use xtickname to give text to the tickmarks, they have NO white lines.
>>
>> Is this a clue?
>
> On my Windows 7 machine (all updates), with IDL 8.2.3, I run this
> command:
>
> IDL> cgplot, cgdemodata(1), Title='This is a Long Title', $
> XTitle='This is Another LONG Title', $
> YTitle='And Still Another Tiitle', $
> Font=0, Output='test_hardware.ps'
>
> I'm viewing the PostScript files in GSView 5.0 at a very high
> magnification (at least 300 percent).
>
> If I set FONT=0, I see no evidence of lines. If I set FONT=1 (with a
> Times True-Type font selected), I see evidence of lines in the Plot
> titles, including the X and Y titles, but not on the number annotations
> for the axes.
>
> If I set FONT=0, and turn anti-aliasing on in the viewer, the text is
> smooth. If I turn it off, the text is jagged about the boundaries, as I
> expect.
>
> If I set FONT=1, then the output (although it has lines from the
> polygons that made up the title fonts), shows no effect with anti-
> aliasing on or off. Also, exactly what I would expect.
>
> The lines (or not) from the PostScript file is carried over to the PDF
> file when I create that from the PostScript file.
>
> If I set FONT=1 and render in 24-bit color in the PostScript device,
> there is no difference from doing this in 8-bit color.
>
> If I set FONT=1, LANGUAGE_LEVEL=2, DECOMPOSED=[0 or 1], there is no
> difference in output.
>
> Any clues there? :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Okay! This method of using FONT=0 and FONT=1 within the cgPlot call works!
See the two plots below, one using FONT=0 and the next using FONT=1.

https://www.dropbox.com/s/sssrxis3gadzmoz/Font%3D0.pdf?dl=0

https://www.dropbox.com/s/snr3g9933o7qda5/Font%3D1.pdf?dl=0

BUT now I want to get this to work after loading a ton of commands into a cgWindow. It seems that theoretically it should work using cgControl, PS_FONT=0, but as Phillip mentioned above, that command is ineffectual. Is this a bug, maybe?
Re: ImageMagick option not showing up in Coyote Graphics window [message #90473 is a reply to message #90472] Tue, 03 March 2015 15:17 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> BUT now I want to get this to work after loading a ton of commands into a cgWindow. It seems that theoretically it should work using cgControl, PS_FONT=0, but as Phillip mentioned above, that command is ineffectual. Is this a bug, maybe?

Yes, it IS a bug! And, a hard to find one, too. :-)

You need this updated file:

http://www.idlcoyote.com/programs/cgps_open.pro

Thanks for hanging in there and being so persistent. And, for not
deserting to Python. ;-)

Cheers,

David

P.S. The bug was such that if the PostScript font got set to 1 in the
IDL session, it could not be set back to zero. This only occurred when
setting parameters with cgControl. (I might have discovered this myself,
but I never use cgControl. Blush...)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90485 is a reply to message #90473] Wed, 04 March 2015 14:45 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Tuesday, March 3, 2015 at 4:17:38 PM UTC-7, David Fanning wrote:
> allison jaynes writes:
>
>> BUT now I want to get this to work after loading a ton of commands into a cgWindow. It seems that theoretically it should work using cgControl, PS_FONT=0, but as Phillip mentioned above, that command is ineffectual. Is this a bug, maybe?
>
> Yes, it IS a bug! And, a hard to find one, too. :-)
>
> You need this updated file:
>
> http://www.idlcoyote.com/programs/cgps_open.pro
>
> Thanks for hanging in there and being so persistent. And, for not
> deserting to Python. ;-)
>
> Cheers,
>
> David
>
> P.S. The bug was such that if the PostScript font got set to 1 in the
> IDL session, it could not be set back to zero. This only occurred when
> setting parameters with cgControl. (I might have discovered this myself,
> but I never use cgControl. Blush...)
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")


Excellent! Glad to find something real to point to in this mess.

However, with the updated cgps_open file I'm getting an error at:
sizes = cgPSWindow(_Extra=extra, LANDSCAPE=landscape, /SANE_OFFSETS)

Can't figure it out yet, but I'll try again later on.
Re: ImageMagick option not showing up in Coyote Graphics window [message #90486 is a reply to message #90485] Wed, 04 March 2015 15:02 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> Excellent! Glad to find something real to point to in this mess.
>
> However, with the updated cgps_open file I'm getting an error at:
> sizes = cgPSWindow(_Extra=extra, LANDSCAPE=landscape, /SANE_OFFSETS)
>
> Can't figure it out yet, but I'll try again later on.

I'm assuming you have the latest Coyote Library. Downloading the latest
solves a LOT of problems. :-)

SANE_OFFSETS!? I must have been drinking that day! I'll go see what that
is about. You get to this line by running cgPS_Open?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90488 is a reply to message #90486] Wed, 04 March 2015 15:18 Go to previous messageGo to next message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Wednesday, March 4, 2015 at 4:02:22 PM UTC-7, David Fanning wrote:
> allison jaynes writes:
>
>> Excellent! Glad to find something real to point to in this mess.
>>
>> However, with the updated cgps_open file I'm getting an error at:
>> sizes = cgPSWindow(_Extra=extra, LANDSCAPE=landscape, /SANE_OFFSETS)
>>
>> Can't figure it out yet, but I'll try again later on.
>
> I'm assuming you have the latest Coyote Library. Downloading the latest
> solves a LOT of problems. :-)
>
> SANE_OFFSETS!? I must have been drinking that day! I'll go see what that
> is about. You get to this line by running cgPS_Open?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Oh actually I got to that line by compiling... running gives me no error.

I DO have the latest Coyote! I updated 2 weeks ago along with Ghostscript and ImageMagick... the starting day of all my woes.
Re: ImageMagick option not showing up in Coyote Graphics window [message #90489 is a reply to message #90488] Wed, 04 March 2015 15:29 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> Oh actually I got to that line by compiling... running gives me no error.
>
> I DO have the latest Coyote! I updated 2 weeks ago along with Ghostscript and ImageMagick... the starting day of all my woes.

Then, I suspect you might be an astronomer and have extra copies or
pieces of the Coyote Library lying around causing trouble. Have you ever
run the routine cgFindCoyoteFiles? That might tell you where the problem
lies. You want to make sure you only have ONE copy of the Coyote
Library, the latest one. See Step 4 here:

http://www.idlcoyote.com/code_tips/fixcoyoteprogram.php

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90490 is a reply to message #90488] Wed, 04 March 2015 15:36 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
allison jaynes writes:

> I DO have the latest Coyote! I updated 2 weeks ago along with Ghostscript and ImageMagick... the starting day of all my woes.

I think the latest was created yesterday. At least four Coyote Library
routines have been updated in the past two weeks. When I say "latest" I
normally mean the the one I downloaded less than an hour ago. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: ImageMagick option not showing up in Coyote Graphics window [message #90512 is a reply to message #90489] Thu, 05 March 2015 10:55 Go to previous message
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
On Wednesday, March 4, 2015 at 4:30:01 PM UTC-7, David Fanning wrote:
> allison jaynes writes:
>
>> Oh actually I got to that line by compiling... running gives me no error.
>>
>> I DO have the latest Coyote! I updated 2 weeks ago along with Ghostscript and ImageMagick... the starting day of all my woes.
>
> Then, I suspect you might be an astronomer and have extra copies or
> pieces of the Coyote Library lying around causing trouble. Have you ever
> run the routine cgFindCoyoteFiles? That might tell you where the problem
> lies. You want to make sure you only have ONE copy of the Coyote
> Library, the latest one. See Step 4 here:
>
> http://www.idlcoyote.com/code_tips/fixcoyoteprogram.php
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

I'm in space science, not astro! :-)
But no, I don't have extra copies laying around - I'm fairly diligent with path management. However, SVN'ing the latest full coyote library worked! So it was a failure on my part to keep the library updated.

And: CgControl works to set the font. No more white lines! Problem solved, without having to resort to Python...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: data with number of columns variables
Next Topic: WIDGET_TABLE and /ALL_EVENTS

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

Current Time: Wed Oct 08 11:53:33 PDT 2025

Total time taken to generate the page: 0.00730 seconds