Hello,
Does anybody know how to save a simpleplot pic to a file as a .gif or .bmp?
I found PICSAV in the simpleplot manual, but this just saves sizes, positions and scales of the current pic as an integer expression.
Many thanks
Albert
Welcome to our forums
Hello,
Does anybody know how to save a simpleplot pic to a file as a .gif or .bmp?
I found PICSAV in the simpleplot manual, but this just saves sizes, positions and scales of the current pic as an integer expression.
Many thanks
Albert
As a test program I came up with this. It saves a bitmap to TestBmp.bmp
However a small dialogue box flashes up briefly when running the program. Is there a way to suppress this?
winapp
program Save_Bmp
INCLUDE 'CLEARWIN.INS'
INTEGER NPTS, NELEM
PARAMETER(NPTS=4, NELEM= 2)
INTEGER ELEMS(3,2)
REAL X(NPTS), Y(NPTS), Z(NPTS)
REAL XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX, UMIN, UMAX
DATA X/1.0,2.0,1.0,2.0/
DATA Y/1.0,1.0,2.0,2.0/
DATA Z/1.0,2.0,2.0,1.0/
data ELEMS(1,:)/1,1,/ ! each element described by 3 nodes
data ELEMS(2,:)/2,3/ ! in each col of ELEMS
data ELEMS(3,:)/4,4/
CALL OWNFIL (4, 2, 0, 'C:\\\\TestBmp.bmp')
CALL DEVNO(5365)
CALL VSEDGV(1) ! Draw element boundaries
CALL LIMEXC(X, NPTS, XMIN, XMAX) ! Find range of x...
CALL LIMEXC(Y, NPTS, YMIN, YMAX) ! ... and Y ...
CALL LIMEXC(Z, NPTS, ZMIN, ZMAX) ! ...
CALL LIMEXC(Z, NPTS, UMIN, UMAX) ! Draw contours over range ...
CALL VS3DLM(XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX)
CALL PAGMRG(2.0, 2.0, 1.0, 0.0) ! Picture Margin
CALL VSNEW
CALL VSUTOC(UMIN, UMAX, 8, 14) ! ... of Z
CALL VSZu(X, Y, Z, Z,NPTS, ELEMS, 3, NELEM) ! Draw Z
CALL VSOUT
CALL ENDPLT
end program Save_Bmp
I dump the active selected clearwin+ screen as a .pcx or .jpg file, using the clearwin+ calls :-
call write_graphics_to_pcx@ (pcx_file_name, error_pcx)
or error_jpg = export_image@ (jpg_file_name)
These can be opened with photoeditor or similar and then saved as bitmaps. I think there are routines to dump as .bmp , but these formats produce much larger graphics files for my style of graphics.
I hope this helps.
Thanks John, I will look at those, as the simpleplot routines can only save as .bmp or .wmf, which are a little bit limiting.
Regards
Albert
I've been following your troubles with simpleplot. Is the issue really using simpleplot, or is it that you want to contour a field value over a mesh of triangular elements (with values at the nodes), and get a hard copy of that? If the latter, I can give you a routine to do the contouring ...
If it is the latter, then send me a private message with an address to send it to.
Eddie