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

Home » Public Forums » archive » running code via cron changes image output size
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: running code via cron changes image output size [message #94475 is a reply to message #94474] Fri, 02 June 2017 08:41 Go to previous messageGo to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
On 06/02/2017 03:52 PM, Brian McNoldy wrote:
> I have been struggling with a very obscure and odd issue. I have
> code that utilizes the function graphics (map, scatterplot, colorbar,
> text... nothing weird). I also use the buffer keyword so no windows
> open.
>
> When I run the code manually in the DE, the image that gets saved
> (via "m.save,filename,border=5,resolution=100") is 1295x487 pixels.
> Fine.
>
> I also have the code set to run via a script that can be called by
> cron. When I run the script myself (via ./run_script.sh), the image
> that gets saved is 1295x487 pixels. Great.
>
> But when I allow cron to run the same script, the image that gets
> saved is 1297x488. Why?? I have literally zero ideas why that would
> make a difference, and I need them to be the same (aside from
> brute-forcing a resize after-the-fact).
>
> I'd be happy to provide any other details if they're helpful in
> solving this.

I don't know about CRON, but using the BUFFER keyword can change the
size, or rather not using it crops it to display size.

Have you tried fixing the graphic size by using

m=map(.....,DIMENSIONS=[width, height]); ?

Probably does not solve the underlying problem, but might be sufficient
as a workaround.


Another approach, don't set the BORDER keyword of the SAVE method.
If the graphic contains different content, setting the BORDER keyword
can result in different output sizes, e.g. if the axis labels take up a
different amount of space. The reason for that can be that the labels
show different numbers (eg 100 vs 10) or use a different font.


By the way, any chance the different sizes could be caused by an
environment variable, that is different depending on whether the script
is started as a CRON job or directly in the terminal?


I hope one of the above approaches helps, if not more details might be
required so we can help you. Unless someone else has an idea....

Good luck, Markus
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Image registration
Next Topic: NARR Lambert Conformal Conic projection to lat lon projection conversion

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

Current Time: Wed Oct 08 11:48:11 PDT 2025

Total time taken to generate the page: 0.00449 seconds