Re: IDL routine for compress raster-8 image? (lossless) [message #3503] |
Tue, 07 February 1995 13:52 |
robijn
Messages: 18 Registered: June 1994
|
Junior Member |
|
|
In article <3h7n0hINNi60@uts.ipp-garching.mpg.de>,
Karl Krieger <kak@ipp-garching.mpg.de> wrote:
> robijn@Strw.LeidenUniv.NL (Frank Robijn) writes:
>
>> In article <D3Kxxp.LI2@ireq.hydro.qc.ca>,
>> Gilles Ratel 8720 <ratel@ireq-ccfm.hydro.qc.ca> wrote:
>>> [...]
>>> I have a code in C langage, but is not possible use CALL_EXTERNAL
>>> because maximum data with DLL is 64 kB.
>>> [...]
>
>> Really? I don't have a PC version at hand, but I can't image why you can't
>> address >64K of data.
>
> Unfortunately, IDL for Windows only supports 16bit DLL's. Therefore, your
> address space for exchanging a single chunk of data is limited to
> a 64kB block. Inside your DLL you can of course allocate much larger
> arrays using FAR or HUGE memory models.
>
> It would be a good question to RSI's development team if support of
> 32bit DLL's is planned for Windoze95. Or, even better, IDL for OS/2.
>
Ok, I tried it at home. Indeed, you can only pass 64K of data. That is not
a Windows problem, but more likely a shortcoming of IDL. Apparently IDL
uses its own memory management routines, not Windows's GlobalAlloc.
Of course, each data chunk is still limited to 64K, but since the
processor is running in enhanced mode that fact is hidden by the use
of selectors. I agree that a 32-bit version would probably be more
efficient. Why not use win32s with Windows 3.1?
To return to the problem of the original posting: you can consider
passing the bitmap in two pieces and creating a complete copy in the DLL.
You should use huge pointers to address pixels in the bitmap, but
at least you can use the existing code.
Frank
--
_____ ____
/ / / Frank Robijn URL: http://WWW.Strw.LeidenUniv.NL/~robijn/
/___ /___/ Sterrewacht Leiden Internet: Robijn@Strw.LeidenUniv.NL
/ / \ Phone (31) 71 275841 Bitnet: Robijn@HLERUL51
/ / \ Fax : (31) 71 275819 Local: Robijn@HL628
Snail: P.O.Box 9513, 2300 RA Leiden, The Netherlands
|
|
|
Re: IDL routine for compress raster-8 image? (lossless) [message #3508 is a reply to message #3503] |
Tue, 07 February 1995 03:53  |
kak
Messages: 16 Registered: February 1995
|
Junior Member |
|
|
robijn@Strw.LeidenUniv.NL (Frank Robijn) writes:
> In article <D3Kxxp.LI2@ireq.hydro.qc.ca>,
> Gilles Ratel 8720 <ratel@ireq-ccfm.hydro.qc.ca> wrote:
>> [...]
>> I have a code in C langage, but is not possible use CALL_EXTERNAL
>> because maximum data with DLL is 64 kB.
>> [...]
> Really? I don't have a PC version at hand, but I can't image why you can't
> address >64K of data. IDL passes a pointer to the data memory, and I assume
> IDL uses Windows functions to allocate memory, which allows for 4Gb of
> data (in principle). Where's the problem then?
Unfortunately, IDL for Windows only supports 16bit DLL's. Therefore, your
address space for exchanging a single chunk of data is limited to
a 64kB block. Inside your DLL you can of course allocate much larger
arrays using FAR or HUGE memory models.
It would be a good question to RSI's development team if support of
32bit DLL's is planned for Windoze95. Or, even better, IDL for OS/2.
Karl
--
--
IPP, PO Box 1533 | Phone: +49-89-3299-1655 | E-Mail:
D-85740 Garching | FAX : +49-89-3299-2591 | kak@ipp-garching.mpg.de
|
|
|
Re: IDL routine for compress raster-8 image? (lossless) [message #3512 is a reply to message #3508] |
Mon, 06 February 1995 12:13  |
robijn
Messages: 18 Registered: June 1994
|
Junior Member |
|
|
In article <D3Kxxp.LI2@ireq.hydro.qc.ca>,
Gilles Ratel 8720 <ratel@ireq-ccfm.hydro.qc.ca> wrote:
> [...]
> Actually I get 320x240x8bits (~75kB) image via IDL on PC.
> [...]
> I have a code in C langage, but is not possible use CALL_EXTERNAL
> because maximum data with DLL is 64 kB.
> [...]
Really? I don't have a PC version at hand, but I can't image why you can't
address >64K of data. IDL passes a pointer to the data memory, and I assume
IDL uses Windows functions to allocate memory, which allows for 4Gb of
data (in principle). Where's the problem then?
Frank
--
_____ ____
/ / / Frank Robijn URL: http://WWW.Strw.LeidenUniv.NL/~robijn/
/___ /___/ Sterrewacht Leiden Internet: Robijn@Strw.LeidenUniv.NL
/ / \ Phone (31) 71 275841 Bitnet: Robijn@HLERUL51
/ / \ Fax : (31) 71 275819 Local: Robijn@HL628
Snail: P.O.Box 9513, 2300 RA Leiden, The Netherlands
|
|
|