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 

Save full %gr

 
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: 2813
Location: South Pole, Antarctica

PostPosted: Tue Sep 09, 2014 9:23 pm    Post subject: Save full %gr Reply with quote

John Horspool suggested ones here how to save the full OpenGL screen. How his brilliant hack works without allocating any memory is still not quite clear to me. You can find it here using Search.

Now I wish again that %og and %gr were absolutely the same allowing using same controls and graphics library calls. Unfortunately they are
from different planets

I say that because I need the same feature of saving entire usual %gr screen. I have that implemented for highlighted portion of the screen. You just highlight needed part with the mouse (rubber band it) and Ctrl+C to place it into clipboard. Then you can do whatever you want - either to Ctrl+S to save to graphics file or Ctrl+V to new window or Photoshop. This is done extremely easy in Clearwin+ (it's just classical example why we need GUI builders like CWP) with just one single line

i = winio@('%ac[Ctrl+C]&','Copy')

and that's basically by 90% all. You can then either see that in new widnow

i = winio@('%ac[Ctrl+V]&','Paste')

or save to file of different formats like PNG, PCX, BMP, GIF or JPG etc with few more Fortran text lines

But sometimes i need to save exactly the same size images for comparison or movies and my way of highlighting + saving fails because you always
miss by one-two pixels. This can be done via multiple lines of Fortran text using CWP, putting stuff into huge array sucking last bits from 3-4GB of memory 32bit compiler allows but may be you can share the subroutines ?
Back to top
View user's profile Send private message
Wilfried Linder



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

PostPosted: Tue Sep 09, 2014 9:49 pm    Post subject: Reply with quote

Dan, you wrote "I say that because I need the same feature of saving entire usual %gr screen." I'm not really sure what you mean, but using the export_image@ function (and nothing else but this) you will get the whole visible %gr area as BMP or JPG or ... file. But I think that you want to do something different?

Code:
      j = winio@('%`gr[rgb_colours]',...,handle)
       ...
      j = select_graphics_object@(handle)
       ...
      j = export_image@('my_file.jpg')


Wilfried


Last edited by Wilfried Linder on Wed Sep 10, 2014 6:14 am; edited 1 time in total
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Wed Sep 10, 2014 6:14 am    Post subject: Reply with quote

As to something different I thought also about putting the whole %gr area into clipboard. But your suggestion is basically enough good for me. I use that function but was confused and thought that it is saving only selected area (how it works in my case). Thanks Wilfried.
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
Page 1 of 1

 
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