 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Sun Sep 11, 2016 9:01 am Post subject: Re: |
|
|
Paul,
in case of get_dib_block@ there are another two remarks:
1. Please remember that get_dib_block@(and also get_dib_size@) crashes, when the jpeg identifier (JFIF-Tag = FF E0 00 10 4A 46 49 46 00 01 01 01 00 B4 00 B4 00 FF E1) is missing.This is unusual but allowed, for example the jpeg-files of my digitalcamera are without JFIF-Tag.
2. Is it possible to extend get_dib_block@ also for png-files? This is one part of my wishlist.
Another part of my wishlist is a pendant to the (DOS)-command "wget". Now, I help me with WinExec('wget [option]...[url]',error), but this is not a good solution.
Thanks
Chemie |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Sep 12, 2016 8:17 am Post subject: |
|
|
Items 1 and 2 might work if you were to call USE_GDIPLUS_IMAGE_FILES@. See cwplus.enh.
I am not familiar with wget but the routine DOWNLOAD@ might be appropriate.
See ftn95.chm. |
|
Back to top |
|
 |
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Mon Sep 12, 2016 3:50 pm Post subject: Re: |
|
|
Hi Paul,
many thanks. Your Info was very useful for me. With read_url@ (the pendant to wget) and use_gdiplus_image_files@ I can get and display some png-files from the web four times faster than before.
Chemie |
|
Back to top |
|
 |
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Wed Oct 12, 2016 4:05 pm Post subject: Re: |
|
|
Hi,
I always have problems with get_dib_block@. Look at my testprogram
winapp
program pngtest
use mswin
implicit none
integer*4 xsize,ysize,a,bildctrl,picsizex,picsizey,urlmode
integer*4 func,mode,errcode,nbbp,ercode,urlerror,allocerror
character*255 filename,url
character*1, dimension(:,:, , allocatable :: picture
xsize=2048
ysize=1536
xsize=256
ysize=256
urlmode=1
bildctrl=0
url='http://tile.openstreetmap.org/15/16515/12525.png'
filename='test.png'
a=winio@('%ca[test]&')
a=winio@('%gr&',xsize,ysize)
a=winio@('%lw',bildctrl)
call read_url@(url,filename,urlmode,urlerror)
a=use_gdiplus_image_files@(1)
call get_dib_size@(filename,picsizex,picsizey,nbbp,ercode)
allocate(picture(3,picsizex,picsizey),stat=allocerror)
call get_dib_block@(filename,picture,picsizex,picsizey,0,0,picsizex,picsizey,0,0,errcode)
a=winio@('%ca[Result]&')
a=winio@('%nlResult: %wd %wd %wd %wd %wd %wd&',picsizex,picsizey,urlerror,nbbp,ercode,errcode)
a=winio@('%2nl%cn%9`bt[OK]')
call display_dib_block@(0,0,picture,picsizex,picsizey,0,0,xsize,ysize,func,mode,errcode)
end
when I use 256 for xsize, ysize, all is going well, but the errorcodes are wrong, there will be errcode=2(read error) for get_dib_size@ and 1 for get_dib_block@ (this error is not reported).
But when I alter xsize and ysize to e.g. 2048 and 1536, the grogram crashes. Why I can't insert a small picture in a big graphics area?
Thanks for your help
Chemie |
|
Back to top |
|
 |
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Wed Oct 12, 2016 4:10 pm Post subject: Re: |
|
|
Sorry, my fault,
the program crashes not, when I use the correct values in display_dib_block@:
call display_dib_block@(0,0,picture,picsizex,picsizey,0,0,picsizex,picsizey,func,mode,errcode)
but the errcodes are always incorrect.
Chemie |
|
Back to top |
|
 |
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Sun Oct 30, 2016 11:20 am Post subject: Re: |
|
|
Sorry, I have rearranged my testprogram new.
winapp
program pngtest
use mswin
implicit none
integer*4 xsize,ysize,a,imagectrl,picsizex,picsizey,urlmode
integer*4 func,mode,nbbp,urlerror,sizeerrcode,allocerror,blockerrcode,displayerrcode
character*255 filename,url
character*1, dimension(:,:, , allocatable :: picture
xsize=1200
ysize=900
urlmode=1
url='http://tile.openstreetmap.org/15/16515/12525.png'
filename='test.png'
call read_url@(url,filename,urlmode,urlerror)
a=winio@('%ca[test]&')
a=winio@('%gr&',xsize,ysize)
a=winio@('%lw',imagectrl)
a=use_gdiplus_image_files@(1)
call get_dib_size@(filename,picsizex,picsizey,nbbp,sizeerrcode)
allocate(picture(3,picsizex,picsizey),stat=allocerror)
call get_dib_block@(filename,picture,picsizex,picsizey,0,0,picsizex,picsizey,0,0,blockerrcode)
call display_dib_block@(0,0,picture,picsizex,picsizey,0,0,picsizex,picsizey,func,mode,displayerrcode)
a=winio@('%ca[Result]&')
a=winio@('%nlUrl_error: %wd&',urlerror)
a=winio@('%nlImagesize: %wd %wd&',picsizex,picsizey)
a=winio@('%nlGet_dib_size_error: %wd&',sizeerrcode)
a=winio@('%nlAlloc_error: %wd&',allocerror)
a=winio@('%nlGet_dib_block_error: %wd&',blockerrcode)
a=winio@('%nlDisplay_dib_block_error: %wd&',displayerrcode)
a=winio@('%2nl%cn%9`bt[OK]')
end
Why I get an error (errcode=2) in get_dib_size@. Is that only my pc, who produce the error? The file test.png was ok, I can read the file with several programs without errors.
What is about the error (errcode=1) of get_dib_block@? This error is not in the errorlist of get_dib_block@. The display is ok, therefor it is not understandable, that the errcodes are not zero.
Thanks for your help.
Chemie |
|
Back to top |
|
 |
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Mon Jan 02, 2017 11:38 am Post subject: Re: |
|
|
Hi Paul,
first, a happy new year for you and all others.
Now, I have problems with your newdlls14 and newdlls15. I have tryed them and I get with the following program an error:
winapp
program integer7test
use mswin
implicit none
integer*4 a,xpic,ypic,picctrl
integer(7) pichandle
xpic=1000
ypic=800
a=winio@('%ca[Picture]&')
a=winio@('%gr&',xpic,ypic)
a=winio@('%hw&',pichandle)
a=winio@('%lw',picctrl)
end
pichandle is definitly integer(7), but the program crashes.
Perhaps, there are further newdlls, where can I get the latest newdlls?
Thanks
Chemie |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Jan 02, 2017 5:50 pm Post subject: |
|
|
Chemie
I think that the problem is that there is now a miss-match between the compiler and the DLLs. This is the danger when pre-releasing DLLs for testing whilst still using the main release of the compiler.
It may be necessary to wait for the next full release before this issue is resolved. |
|
Back to top |
|
 |
sisutcliffe
Joined: 01 Aug 2006 Posts: 5
|
Posted: Wed May 02, 2018 9:30 am Post subject: browse_for_folder@ |
|
|
A long time ago this thread noted issues with browse_for_folder@ which Paul then told us was fixed. Has anyone seen any regressions?
I don't think my program could get any simpler but always ends up with an access violation at the moment:
Code: |
winapp
program bug
use mswin
character(len=50) :: temp
if( browse_for_folder@('Folder?',temp) )then
write(*,*) temp
else
write(*,*) 'Failed'
endif
stop 0
end program
|
We get
Quote: |
Error: Access Violation reading address 0x0
GET_CSTRING@
BUG
|
Does anyone have any ideas please? We're using 8.30 |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed May 02, 2018 10:45 am Post subject: |
|
|
You just need a larger character variable...
Code: | character(len=550) :: temp |
Maybe ClearWin+ can be made to send you a warning. |
|
Back to top |
|
 |
sisutcliffe
Joined: 01 Aug 2006 Posts: 5
|
Posted: Fri May 04, 2018 8:47 am Post subject: |
|
|
Thanks Paul, a) not sure why that didn't occur to me and b) interesting that the requirement has changed between 32 and 64bit! |
|
Back to top |
|
 |
sisutcliffe
Joined: 01 Aug 2006 Posts: 5
|
Posted: Thu May 24, 2018 9:33 am Post subject: |
|
|
Hi John-Silver,
The 'folder creation' flag is Code: | BIF_NONEWFOLDERBUTTON (0x00000200) |
My understanding is that if you wanted to use this flag you would also need to use the New Dialog Style Code: | BIF_NEWDIALOGSTYLE (0x00000040) | so therefore you would use z'240' as the flag as the individual flags can be added together. I'm not entirely sure what the z indicates but I assume it's so ensure the flag value gets passed through in the correct format for UINT.
Regards
Simon |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|