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

Home » Public Forums » archive » Coyote Graphics PS/PDF output size/orientation
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: Coyote Graphics PS/PDF output size/orientation [message #85505 is a reply to message #85504] Tue, 13 August 2013 21:47 Go to previous messageGo to previous message
Paul Levine is currently offline  Paul Levine
Messages: 29
Registered: February 2008
Junior Member
On 2013-08-14 03:51:04 +0000, David Fanning said:

> Paul Levine writes:
>
>> Also, I am quite interested in your take on the PNG files I wound up
>> with, where the pixel size of the files was quite different from the
>> xwsize and ywsize specified, and some axis titles and labels were cut
>> off. I don't how related this is to the PDF issue, so if you can only
>> deal with one of these issues at a time, then perhaps you need to pass
>> the other one off to Coyote and see where he gets with it ;-)
>
> Yeah, I'll talk to Coyote about this, but he has me drinking gin and
> tonics tonight to celebrate something or other. It will have to be in
> the morning. Oh, I remember, birthdays! We'll sort it out in the
> morning. :-)
>
> Cheers,
>
> David

Ah, well, in that case, happy birthday! I hope for your sake that you
don't see this message until tomorrow morning, but once you do, I have
something interesting to report on PNG conversion. It seems that to a
certain extent, cgps2raster creates PNG files of a certain size that is
determined by the aspect ratio rather than the wxsize/wysize or the
cgControl resize keyword. So, for example, any aspect ratio of 4:3
will produce a PNG of 742 x 556 pixels, and any aspect ratio of 1:1
will prodice a PNG of 573 x 573 pixels.

So when I appended my code with the following lines:

cgControl, Resize=1, Output='Resize_1x1.png'
cgControl, Resize=50, Output='Resize_50x50.png'
cgControl, Resize=800, Output='Resize_800x800.png'
cgControl, Resize=8000, Output='Resize_8000x8000.png'
cgControl, Resize=25000, Output='Resize_25000x25000.png'

each of the resulting PNG files was 573 x 573 pixels.

Now, here's where it gets really interesting. I said "to a certain
extent" before because once the size is above a certain threshold, then
a different sized file is produced. Resize=32767 and any number below
gives me the 573 x 573, but Resize=32768 and any number above that
produces a PNG file that is 742 x 390 pixels . Of course, it can't be
a coincidence that the threshold I did pinpoint is the 15th power of 2.
Just for laughs, I decided to try finding out whether there was an
even higher threshold. So I tried Resize=2.14748e+09 (2^31), which was
still 742 x 390, then I tried to go even higher than that and ended up
getting a "Floating illegal operand" error from cgPlot. So I guess
cgPlot is not able to handle more than about 2.14748 x 2.14748 billion
pixels ;-P

Tomorrow, I will hopefully have access to a windows machine, which I
can use for testing
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: peeling away layers
Next Topic: arithmetic operation on array

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

Current Time: Thu Oct 09 20:23:42 PDT 2025

Total time taken to generate the page: 0.00604 seconds