View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Tue Sep 09, 2014 9:23 pm Post subject: Save full %gr |
|
|
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 |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Tue Sep 09, 2014 9:49 pm Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Wed Sep 10, 2014 6:14 am Post subject: |
|
|
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 |
|
|
|