replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Beta release of ClearWin+
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 

Beta release of ClearWin+
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
DanRRight



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

PostPosted: Sat Jan 31, 2015 5:54 am    Post subject: Reply with quote

Paul,

1) JPG and BMP are OK but GIF or PNG are not. Other types were not checked

2) The code i made in the hurry has some defect: Program crashes when you push esc, no time to investigate why. Just ignore

3) Some additional suggestions: confusing diagnostics.
if you by mistake do not declare hres and vres as integer the compiler gives confusing diagnostics below instead of clearly saying that it expected integers

0024) allocate ( ImageArr(3,hres, vres), stat = kAllocOK)
*** Operand incompatible with opcode

Here is code


Code:

INTEGER , EXTERNAL :: DropFiles
      i=winio@('%ww[no_border]&')
      i=winio@('%bg[#cc9999]&')
      i=winio@('%si! Drag-n-drop BMP file here   %ff %ff&')
      i=winio@('%dr&', DropFiles)

      i=winio@('%ac[Alt+X]&','exit')
      i=winio@(' %ff %cn%tt[OK]')
END PROGRAM        

   integer function  DropFiles()
   use clrwin
   character*128 filename1
   integer*1, dimension(:,:,:), allocatable :: ImageArr
   integer hres, vres, colours, ier

   filename1 = clearwin_string@ ('DROPPED_FILE')
   call get_dib_size@(filename1, hres, vres, nb_colours, ier)
   print*,' hres,vres,nb_colours=',hres, vres, nb_colours

   kAllocOK=0
   allocate ( ImageArr(3,hres, vres),  stat = kAllocOK)
   if (kAllocOK /= 0) write (*,*) 'Allocation problem #', kAllocOK, hres, vres

   call get_dib_block@(filename1,ImageArr,hres, vres,0,0,hres, vres,0,0,ier)
   if(ier.ne.0) Print*, 'get Err=',ier

   i=winio@('%ww&')
   i=winio@('%gr[full_mouse_input,rgb_colours,popup]&',hres,vres)
   i=winio@('%ac[Alt+X]&','exit')
   i=winio@('%ac[esc]&','set', LWwindow_control,0) ! 'exit')
   i=winio@('%lw', LWwindow_control)

   call display_dib_block@(0,0,ImageArr,hres,vres,0,0,hres,vres,0,0,ier)
   if(ier.ne.0) Print*, 'Display Err=',ier

!   deallocate(ImageArr, stat = ios)
!   if (ios /= 0) then
!     print *, "Was nothing to deallocate"
!   end if

    DropFiles=2
   end function

Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Jan 31, 2015 5:38 pm    Post subject: Reply with quote

You need a call to USE_GDIPLUS_IMAGE_FILES@ in order to activate the new feature.
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Sun Feb 01, 2015 6:41 pm    Post subject: Reply with quote

Added two lines

istate=1
istate0= USE_GDIPLUS_IMAGE_FILES@(istate)

got that this function is missing

NO ERRORS, 2 WARNINGS FTN95/Win32 v7.10.0]
WARNING the following symbols are missing:
USE_GDIPLUS_IMAGE_FILES#
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Feb 02, 2015 11:27 am    Post subject: Reply with quote

My apologies for the omission, you will need

Code:
      C_EXTERNAL USE_GDIPLUS_IMAGE_FILES@ '__use_gdiPlusForImageFiles'  &
     &(VAL):INTEGER*4


in your clearwin.ins or as temporary line in your program.
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Tue Feb 03, 2015 8:20 am    Post subject: Reply with quote

Works like charm. And does not crash

ADDITION: inserted that into a bit larger code and it does not work. Same story like with LexicalSort. Devilry. Anyone wants to tell me where error is if i post the whole code? Interesting why this @#$% always happen, specifically when i'm in the hurry and pay a lot of attention to not make any mistakes? Nothing works, even posting of this message took several attempts (forum showed just empty post - does not like my OneDrive link)


Last edited by DanRRight on Wed Feb 04, 2015 11:04 am; edited 2 times in total
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Wed Feb 04, 2015 12:06 am    Post subject: Reply with quote

Here is the link, use it all including by some reason not highlighted end: https://onedrive.live.com/?cid=51A5F9B536E1368D&id=51A5F9B536E1368D!105
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Feb 04, 2015 10:08 am    Post subject: Reply with quote

I have not looked closely at the logic but maybe you need to call USE_GDIPLUS_IMAGE_FILES@(1) at other points in the program as well.

As a test try putting this in every subprogram.
Back to top
View user's profile Send private message AIM Address
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: D�sseldorf, Germany

PostPosted: Sat Feb 07, 2015 1:03 pm    Post subject: Reply with quote

Paul,

I added the line

Code:
      C_EXTERNAL USE_GDIPLUS_IMAGE_FILES@ '__use_gdiPlusForImageFiles'
     *  (VAL):integer*4


in one of my subroutines as you mentioned, but when linking I get the error message "WARNING the following symbols are missing __use_gdiPlusForImageFiles". What is wrong?

Wilfried
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Feb 07, 2015 1:49 pm    Post subject: Reply with quote

Are you sure that you are still using the salflibc.dll beta version?
Back to top
View user's profile Send private message AIM Address
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: D�sseldorf, Germany

PostPosted: Sat Feb 07, 2015 5:04 pm    Post subject: Reply with quote

Yes, after installing the actual FTN95 version, I copied the latest salflibc.dll (dated from 28th of January) into c:\program files (x86)\silverforst\ftn95. I've just controlled that. Should I copy the DLL also into another path?

The error message didn't result from the line C_EXTERNAL ... but from the call to this function (j = use_gdiplus_...).

Wilfried
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Feb 07, 2015 5:50 pm    Post subject: Reply with quote

Maybe there is an old copy of salflibc.dll that is getting in the way.

As a test, try copying the beta DLL to the folder that holds the current executable.
Back to top
View user's profile Send private message AIM Address
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: D�sseldorf, Germany

PostPosted: Sat Feb 07, 2015 6:03 pm    Post subject: Reply with quote

It makes no difference... I just scanned my PC for the DLL, I copied the actual one also into the subdirectory ...\redist, but again no difference. I wrote a small test program, same result. I have no idea about the reason.

Wilfried
Back to top
View user's profile Send private message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: D�sseldorf, Germany

PostPosted: Sat Feb 07, 2015 6:10 pm    Post subject: Reply with quote

Paul,

I found the solution. I only copied the DLL but not the LIB... Sorry for the trouble I made Embarassed

Wilfried
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Feb 08, 2015 10:04 am    Post subject: Reply with quote

I still make the same mistake from time to time.
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Sun Feb 08, 2015 10:39 pm    Post subject: Reply with quote

Unfortunately that suggestion did not work and I have absolutely no time to any experiments right now, fixing this thing is not urgent. But hopefully someone has some free time. By the way the program i uploaded could be useful for everyone many times in your lives. Disclaimer is usual - you can modify it at your convenience and use at your discretion, with of course my zero liability.

The zip file has no exe, only source and bat file for your compilation convenience, so nothing to worry about viruses.

This program digitizes graphs. You have always use Ctrl+LeftClick to change or set anything

1) drop the image,
2) Ctrl+LeftClick on the point on the graph X or Y axis at any initial and end points, then right click, set physical coordinates for the four (X0,X1) and (Y0,Y1) points from the graph better for accuracy of digitizing taking a minimum and maximum on the graph (the pixel coordinates x,y will be set automatically). For example it will be (-315,45) and (-1,1) as in the picture below
3) select/highlight the area which contains the graphs (without other things which might interfere, like graph axis, texts etc if they have the same color as digitized curve). For that again use Ctrl and left mouse button moving mouse fom one desired corner to another
4) chose the color of the digitized curve by stepping on the curve and again CTRL+LeftClicking
5) push Digitize button.

The digitized points will appear on the graph with the color and thickness you can additionally set. You can see if any points are correctly digitized.
You can reload the graph if needed

The directory will contain digitized data and settings file for this specific graph with the same name so that next time you just drop the same graph and only click Digitize button

Try it on this curve



But first please find the bug with PNG, GIF etc files Smile. BMP works fine if you set istate=0 in parameters. Turn this GIF file to BMP initially to see how things work, then change istate=1 and use GIF or PNG to see that the code stops working


Last edited by DanRRight on Mon Feb 09, 2015 8:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
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