Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Write image to disk

Paul_R3
2008-06-10
2013-06-03
  • Paul_R3
    Paul_R3
    2008-06-10

    None of the image writing subroutines (write_bmp, write_jpeg, etc) are working for me in GDL, giving an error message "Procedure not found". Help! How can I write an image to disk, to open in photoshop, or whatever.

    Thanks for any help
    Paul Reiser

     
    • Joel Gales
      Joel Gales
      2008-06-10

      These routines are typically located in the gdl/src/pro subdirectory.  You need to define a !PATH statement containing this directory.  This can be done in a startup routine that is then defined by the environmental variable GDL_STARTUP.

      Joel

       
      • Alain C.
        Alain C.
        2009-02-04

        another way is to use the GDL_PATH:

        export GDL_PATH=$GDL_PATH'+/my/path/to/gdlXYZ/src/pro/:'

        obviously, you can copy the files inside the gdl/src/pro
        into another directory included by your current GDL_PATH or IDL_PATH
        (GDL recycles IDL_PATH if no GDL_PATH defined ...)

        Alain C.

         
  • dgalvan123
    dgalvan123
    2010-06-21

    where is the gdl/src/pro directory?  I installed using MacPorts and can't seem to find that directory.  I do have a directory with some .pro files in it, but GDL doesn't seem to know about that directory by default . .. I have to use the export GDL_PATH definition to make it aware of that before I run gdl.

     
  • Hello,

    The gdl/src/pro path is the relative path in the GDL tarball.

    Macports installs the pro files in $prefix/share/gnudatalanguage/lib by default (where $prefix can be e.g. /opt/local).

    If no GDL_PATH env. variable is set GDL adds the above path automaticaly to its search path (and informs about it during startup).

    Additionally, the current working directory is always included in the GDL's search path.

    Hope that helps,
    Cheers,
    Sylwester

     
  • dgalvan123
    dgalvan123
    2010-06-21

    Strangely, even though I have a MacPorts install in the second directory you listed, when I start GDL it does not seem to be able to find pro files in that directory.  In order to make it aware of pro files in that directory (/opt/local/share/gnudatalanguage/lib), I have to use the export GDL_PATH= command before I start gdl every single time.

    Is there a way I can store that environment variable somewhere so that it is automatically set to the path I want without me having to manually set it every time I want to use GDL?  Someone mentioned using a GDL_startup.pro file that calls a gdl_setup file. ..  but I couldn't figure out how to do that.

    Thanks for your time!

     
  • If you have any of the GDL_PATH or IDL_PATH variables set, GDL will not try to add any paths automatically - perhaps that's the case.

    Both the way of setting an environmental variable, and the way of doing it everytime a shell is started depends on which shell you're using. In case of bash, you can put any instructions to be executed at startup in ~/.bashrc

    Cheers,
    Sylwester

     
  • rickcos
    rickcos
    2010-08-04

    I have installed GDL on linux machine.  Can someone tell me where the gdl/src/pro directory is?  I only know where the gdl program is located and there is not a directory with it in there.

    Thanks

     
  • Hello,

    The 'gdl/src/pro' is the path in the GDL source-distribution file. If you compiled a recent version of GDL yourself and installed it using "make install" with default options, the contents of the 'gdl/src/pro' directory should have been placed in /usr/local/share/gnudatalanguage/lib.

    If you used one of the binary packages available for Linux then it depends on the distribution:
    - on Fedora: /usr/share/gnudatalanguage/lib 
    - on ArchLinux: /usr/lib/gdl
    - on Debian & Ubuntu (official): /usr/share/doc/gnudatalanguage/examples/pro/
    - on Ubuntu (the non-oficial package): /usr/share/gnudatalangage/lib
    - on Gentoo: /usr/local/share/gdl
    (not 100% sure about the paths - I've just extracted them from the packages/e-mails without actually installing the packages)

    Hope that helps,
    Sylwester