Quoted from PaulLaidler
Here is a link for downloading an interim release of the various DLLs.
Please make sure that you backup your existing DLLs before installing and testing the new ones.
https://www.dropbox.com/s/2sn929jqilhgmp8/newDLLs.zip?dl=0
Paul, thanks for the interim release of the various DLLs.
I have tested the allocation and found no errors. But now, I have problems with display_dib_block@, when I use large arrays. Are there some limitations for the size of pictures? To illustrate my problem, I have written a test program, first I allocate a small picture und display the upper left in red and the lower right corner in green colour. In the second part, I allocate a large picture and display also the upper left corner, this goes well, but when I display the lower right corner, the program crashes. Here is the testprogram:
winapp
program dibblocktest
use mswin
implicit none
integer*4 a,i,j,ii,jj,i1,i2,i3,xsize,ysize,xpic,ypic,picctrl,aerror
integer*4 func,mode,errcode
character*1, dimension(:,:,:), allocatable :: picture
func=0
mode=0
errcode=0
i1=1
i2=2
i3=3
xpic=1000
ypic=1000
a=winio@('%ca[Picture]&')
a=winio@('%gr&',xpic,ypic)
a=winio@('%lw',picctrl)
! create and allocate a small picture
xsize=5000
ysize=5000
allocate(picture(i3,xsize,ysize),stat=aerror)
if (aerror.ne.0) goto 1
! create and display a small red picture (upper left corner)
do i=1,xpic
do j=1,ypic
picture(i1,i,j)=char(255)
picture(i2,i,j)=char(0)
picture(i3,i,j)=char(0)
enddo
enddo
call display_dib_block@(i1,i1,picture,xsize,ysize,i1,i1,xpic,ypic,func,mode,errcode)
call sleep@(2.0)
! create and display a small green picture (lower right corner)
do i=1,xpic
ii=xsize-xpic+i
do j=1,ypic
jj=ysize-ypic+j
picture(i1,ii,jj)=char(0)
picture(i2,ii,jj)=char(255)
picture(i3,ii,jj)=char(0)
enddo
enddo
call display_dib_block@(i1,i1,picture,xsize,ysize,xsize-xpic,ysize-ypic,xpic,ypic,func,mode,errcode)
call sleep@(2.0)
deallocate(picture)
! create and allocate a large picture ( ca. 7 gb)
xsize=50000
ysize=50000
allocate(picture(i3,xsize,ysize),stat=aerror)
if (aerror.ne.0) goto 1
! create and display the upper left corner of the large picture
do i=1,xpic
do j=1,ypic
picture(i1,i,j)=char(255)
picture(i2,i,j)=char(0)
picture(i3,i,j)=char(0)
enddo
enddo
call display_dib_block@(i1,i1,picture,xsize,ysize,i1,i1,xpic,ypic,func,mode,errcode)
call sleep@(2.0)
! create and display the lower right corner of the large picture
! this display fails, I don't know why, it is the same code as with the small picture
do i=1,xpic
ii=xsize-xpic+i
do j=1,ypic
jj=ysize-ypic+j
picture(i1,ii,jj)=char(0)
picture(i2,ii,jj)=char(255)
picture(i3,ii,jj)=char(0)
enddo
enddo
call display_dib_block@(i1,i1,picture,xsize,ysize,xsize-xpic,ysize-ypic,xpic,ypic,func,mode,errcode)
deallocate(picture)
1 end
Have I made an error?
Thanks
Chemie