forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding text comments to JPG, PNG
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7160
Location: Salford, UK

PostPosted: Thu Sep 16, 2021 7:42 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2479
Location: South Pole, Antarctica

PostPosted: Thu Sep 16, 2021 1:51 pm    Post subject: Reply with quote

As always it was nice discussion on this forum with great help from everyone, thanks to all.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7160
Location: Salford, UK

PostPosted: Mon Oct 25, 2021 12:08 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1012
Location: Morrison, CO, USA

PostPosted: Tue Oct 26, 2021 4:53 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2479
Location: South Pole, Antarctica

PostPosted: Thu Oct 28, 2021 7:50 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7160
Location: Salford, UK

PostPosted: Thu Oct 28, 2021 6:12 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2479
Location: South Pole, Antarctica

PostPosted: Sat Oct 30, 2021 9:06 am    Post subject: Reply with quote

Paul, Still other functions also missing. Seems they are not in the Oct 25/26 update
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7160
Location: Salford, UK

PostPosted: Sat Oct 30, 2021 10:00 am    Post subject: Reply with quote

Dan

Have you downloaded the latest clearwin.ins etc (dated 26 October) and copied them to your FTN95\INCLUDE folder?
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2479
Location: South Pole, Antarctica

PostPosted: Sat Oct 30, 2021 10:58 pm    Post subject: Reply with quote

Yes. They are all dated by Oct 25 though
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7160
Location: Salford, UK

PostPosted: Sun Oct 31, 2021 7:34 am    Post subject: Reply with quote

The DLLs are dated 25 October. The include and mod files are dated 26 October with a separate download.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2479
Location: South Pole, Antarctica

PostPosted: Mon Nov 01, 2021 8:41 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7160
Location: Salford, UK

PostPosted: Mon Nov 01, 2021 10:33 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2479
Location: South Pole, Antarctica

PostPosted: Mon Nov 01, 2021 7:40 pm    Post subject: Reply with quote

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 Smile. 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
View user's profile Send private message
jlb



Joined: 21 Oct 2020
Posts: 25

PostPosted: Tue Nov 02, 2021 9:54 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7160
Location: Salford, UK

PostPosted: Tue Nov 02, 2021 12:45 pm    Post subject: Reply with quote

Dan

Check that there are no older copies of the ClearWin+ DLLs in the local folder or on the PATH.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
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