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

Home » Public Forums » archive » Re: Problems with reading images
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: Problems with reading images [message #75269] Wed, 23 February 2011 14:40
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Feb 23, 7:24 pm, Ding <gardener_2...@hotmail.com> wrote:
> You are correct, I overwrite the !DLM_PATH, without including the
> <IDL_DEFAULT>. I should restore it, somehow, possibly copy from my
> colleages

If all you are missing is IDL's library path, you only need to add
<IDL_DEFAULT>.
Re: Problems with reading images [message #75270 is a reply to message #75269] Wed, 23 February 2011 14:24 Go to previous message
Ding is currently offline  Ding
Messages: 20
Registered: March 2008
Junior Member
On Feb 23, 8:24 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Feb 23, 4:27 pm, Ding <gardener_2...@hotmail.com> wrote:
>
>> I am quit sure, I include the all the libraries and working
>> directories in the start up routine
>
> Are you sure you were using 'read_jpeg.pro' and 'read_png.pro'? Also,
> the way you were calling read_png was as a function, not a procedure.
>
> IDL's read_png() and read_jpeg do not come (anymore, at least) as .pro
> files. They are DLMs. If you are trying to use them, the relevant path
> is the DLM search path, and it should include IDL's default path.
>
> What is the result of
>
> print,!dlm_path
>
> ?
>
> What you pasted above indicates that IDL found and compiled a
> read_png.pro, which could be the obsolete file idl/idl80/lib/obsolete/
> read_png.pro, which contains a procedure, not a function. That would
> be the reason IDL then complains it did not find a function called
> read_png.

You are correct, I overwrite the !DLM_PATH, without including the
<IDL_DEFAULT>. I should restore it, somehow, possibly copy from my
colleages

Cheers

Ding Yuan
Re: Problems with reading images [message #75275 is a reply to message #75270] Wed, 23 February 2011 12:26 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Wednesday, February 23, 2011 11:50:06 AM UTC-5, Ding wrote:
> Hi everyone,
>
> I used two procedures, 'read_jpeg.pro' and 'read_png.pro', both of
> them worked well.

READ_JPEG and READ_PNG are not writting in IDL but are DLMs which should be automatically linked when starting IDL. (Actually there is a file read_png.pro but it is obsolete, and only used to call READ_PNG as a procedure rather than a function. That is why you got my favorite headscratching IDL error message:

% Compiled module: READ_PNG.
% Attempt to call undefined procedure/function: 'READ_PNG'.

Unfortuantely, I'm not sure why you aren't automatically linking to the DLMs. You might tell us your IDL version and machine. Also, is it possible you are using a different IDL version now? --Wayne
Re: Problems with reading images [message #75277 is a reply to message #75275] Wed, 23 February 2011 12:24 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Feb 23, 4:27 pm, Ding <gardener_2...@hotmail.com> wrote:
> I am quit sure, I include the all the libraries and working
> directories in the start up routine

Are you sure you were using 'read_jpeg.pro' and 'read_png.pro'? Also,
the way you were calling read_png was as a function, not a procedure.

IDL's read_png() and read_jpeg do not come (anymore, at least) as .pro
files. They are DLMs. If you are trying to use them, the relevant path
is the DLM search path, and it should include IDL's default path.

What is the result of

print,!dlm_path

?

What you pasted above indicates that IDL found and compiled a
read_png.pro, which could be the obsolete file idl/idl80/lib/obsolete/
read_png.pro, which contains a procedure, not a function. That would
be the reason IDL then complains it did not find a function called
read_png.
Re: Problems with reading images [message #75278 is a reply to message #75277] Wed, 23 February 2011 12:15 Go to previous message
Ammar Yusuf is currently offline  Ammar Yusuf
Messages: 36
Registered: October 2010
Member
On Feb 23, 11:50 am, Ding <gardener_2...@hotmail.com> wrote:
> Hi everyone,
>
> I used two procedures, 'read_jpeg.pro' and 'read_png.pro', both of
> them worked well. After a disruption (in dead loop), I closed the
> terminal and resulted in fault. After I restarted another session, it
> complaint my procedures
>
> IDL> read_jpeg,'img1.jpg',img1
> % Attempt to call undefined procedure/function: 'READ_JPEG'.
> IDL> tmp=read_png('img.png')
> % Compiled module: READ_PNG.
> % Attempt to call undefined procedure/function: 'READ_PNG'.
>
> Any one knows what might be the problem?  they both worked well before
> the fault.
>
> Cheers
>
> Ding Yuan
> CFSA, Physics
> Warwick University

I would try opening those functions up and compiling them and then try
calling them again. Hope that helps and works. Thanks.
Re: Problems with reading images [message #75280 is a reply to message #75278] Wed, 23 February 2011 11:27 Go to previous message
Ding is currently offline  Ding
Messages: 20
Registered: March 2008
Junior Member
On Feb 23, 6:52 pm, Jean <jeanbilh...@gmail.com> wrote:
> On Feb 23, 11:50 am, Ding <gardener_2...@hotmail.com> wrote:
>
>
>
>> Hi everyone,
>
>> I used two procedures, 'read_jpeg.pro' and 'read_png.pro', both of
>> them worked well. After a disruption (in dead loop), I closed the
>> terminal and resulted in fault. After I restarted another session, it
>> complaint my procedures
>
>> IDL> read_jpeg,'img1.jpg',img1
>> % Attempt to call undefined procedure/function: 'READ_JPEG'.
>> IDL> tmp=read_png('img.png')
>> % Compiled module: READ_PNG.
>> % Attempt to call undefined procedure/function: 'READ_PNG'.
>
>> Any one knows what might be the problem?  they both worked well before
>> the fault.
>
>> Cheers
>
>> Ding Yuan
>> CFSA, Physics
>> Warwick University
>
> Are you sure they are in the path. Sometimes I make the mistake of
> starting my IDL session and forget to cd to the location where the
> procedures are defined. Starting idl from this folder does it
> automatically.
>
> Jean

I am quit sure, I include the all the libraries and working
directories in the start up routine
Re: Problems with reading images [message #75282 is a reply to message #75280] Wed, 23 February 2011 10:52 Go to previous message
Jean[2] is currently offline  Jean[2]
Messages: 41
Registered: October 2010
Member
On Feb 23, 11:50 am, Ding <gardener_2...@hotmail.com> wrote:
> Hi everyone,
>
> I used two procedures, 'read_jpeg.pro' and 'read_png.pro', both of
> them worked well. After a disruption (in dead loop), I closed the
> terminal and resulted in fault. After I restarted another session, it
> complaint my procedures
>
> IDL> read_jpeg,'img1.jpg',img1
> % Attempt to call undefined procedure/function: 'READ_JPEG'.
> IDL> tmp=read_png('img.png')
> % Compiled module: READ_PNG.
> % Attempt to call undefined procedure/function: 'READ_PNG'.
>
> Any one knows what might be the problem?  they both worked well before
> the fault.
>
> Cheers
>
> Ding Yuan
> CFSA, Physics
> Warwick University

Are you sure they are in the path. Sometimes I make the mistake of
starting my IDL session and forget to cd to the location where the
procedures are defined. Starting idl from this folder does it
automatically.

Jean
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL on win7 crashing
Next Topic: PropertySheet COLOR property

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

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

Total time taken to generate the page: 0.00655 seconds