View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Sep 16, 2021 7:42 am Post subject: |
|
|
There is a GDI+ function that looks like it will do the job so I have added this request to the wish list. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Thu Sep 16, 2021 1:51 pm Post subject: |
|
|
As always it was nice discussion on this forum with great help from everyone, thanks to all. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Mon Oct 25, 2021 12:08 pm Post subject: |
|
|
Two new functions GET_IMAGE_PROPERTY@ and SET_IMAGE_PROPERTY@ have been added for the next release of ClearWin+. These can be used with jpeg and png files.
For jpeg files, the properties are also accessible via third party applications.
This is not the case for png files because of the lack of a common standard and the current limitations of the Microsoft GDI+ library; but the new functions can still be used together within ClearWin+.
There is also a new subroutine WINDOW_REFRESH@ that updates any visible data that has been changed.
Here is a sample program that illustates the new routines:
Code: | module mm
use clrwin
character file*256,title*50,contents*256
contains
integer function open_cb()
integer,parameter::N=2
character(20),parameter::filtn(N) = (/"jpeg files","png files "/)
character(6), parameter::filts(N) = (/"*.jpg","*.png"/)
file = " "; title = " "; contents = " "
call WINDOW_REFRESH@()
call GET_FILTERED_FILE@("Open",file,"C:\",filtn,filts,N,1)
if(len_trim(file) > 0)then
ir = GET_IMAGE_PROPERTY@(file,"T",title)
ir = GET_IMAGE_PROPERTY@(file,"C",contents)
endif
open_cb = DO_REDRAW
end function
integer function save_cb()
ir = SET_IMAGE_PROPERTY@(file,"T",title)
ir = SET_IMAGE_PROPERTY@(file,"C",contents)
save_cb = NO_REDRAW
end function
end module mm
winapp
program main
use mm
file = " "
iw = winio@("%ca[Image Properties]&")
iw = winio@("%bg[BTNFACE]&")
iw = winio@("%`bg[WINDOW]&")
iw = winio@("%2.3ob[line_colour,rounded]&",RGB@(200,200,200))
iw = winio@("File %cb%co[read_only]%`bg%30rs%cb&", RGB@(250,250,250), file)
iw = winio@("Title%cb%co[not_read_only]%30rs%cb&", title)
iw = winio@("Contents %cb%30.5re%cb&", contents)
iw = winio@("%ff%nl%rj%^bn[Open] %^bn[Save] %bn[Close]", open_cb, save_cb)
end program
|
|
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Tue Oct 26, 2021 4:53 am Post subject: |
|
|
This is great! I have the ability to do this annotation when I create reports or graphics in the PDF (libHaru library), but nothing in the JPEG; until now!
Thanks for adding this!
Bill |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Thu Oct 28, 2021 7:50 am Post subject: |
|
|
Paul, With this demo i got Run-time Error
*** Error 29, Call to missing routine : ___window_refresh at 0x00401045.
00401000 MM!OPEN_CB [+004a] [recur= 1]
00401390 MAIN [+01f0]
Updates for Salflibc DLLs and INCLUDE files seems are latest by 25 and 26 oct |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Oct 28, 2021 6:12 pm Post subject: |
|
|
OK. Just comment out the call to window_refresh@ for now. It makes no real difference to the functionality of the program. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Sat Oct 30, 2021 9:06 am Post subject: |
|
|
Paul, Still other functions also missing. Seems they are not in the Oct 25/26 update |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Oct 30, 2021 10:00 am Post subject: |
|
|
Dan
Have you downloaded the latest clearwin.ins etc (dated 26 October) and copied them to your FTN95\INCLUDE folder? |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Sat Oct 30, 2021 10:58 pm Post subject: |
|
|
Yes. They are all dated by Oct 25 though |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sun Oct 31, 2021 7:34 am Post subject: |
|
|
The DLLs are dated 25 October. The include and mod files are dated 26 October with a separate download. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Mon Nov 01, 2021 8:41 am Post subject: |
|
|
Yes, the include Zip file is Oct 26 but inside all files are dated Oct25. Complaint is about missing get_image_property@ now |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Mon Nov 01, 2021 10:33 am Post subject: |
|
|
Dan
I have checked and rechecked. The new routines are included in the archive dated 26 October and yes the files in the archive are dated 25 October.
These files must be extracted and copied to your current FTN95\INCLUDE folder typically C:\Program Files (x86)\Silverfrost\FTN95\INCLUDE. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Mon Nov 01, 2021 7:40 pm Post subject: |
|
|
They are there of course, in include folder, I double checked. Can somebody else try this demo above after updating compiler, dll/lib and files in include directory ? These updates are in Support part of this forum. New things never work in first attempt . I even have one program started in 1982 which always fails when I return to it after couple years. Last month after fail I stopped using it. I'm probably very bad messy programmer |
|
Back to top |
|
|
jlb
Joined: 21 Oct 2020 Posts: 45
|
Posted: Tue Nov 02, 2021 9:54 am Post subject: |
|
|
DanRRight
Demo above runs as stated with FTN95 (ftn95_881.zip), DLLs (newDLLs98.zip) and ClearWin+ (clrwin26Oct.zip) from the sticky post in the support forum. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Tue Nov 02, 2021 12:45 pm Post subject: |
|
|
Dan
Check that there are no older copies of the ClearWin+ DLLs in the local folder or on the PATH. |
|
Back to top |
|
|
|