|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Sun Jul 14, 2019 6:22 pm Post subject: call put_dib_block@ and PNG |
|
|
I use put_dib_block@(file_name,ImageDib,wid,hgt,0,0,wid,hhgt,24,ierr)
to save content of OpenGL screen to BMP. Ideally would be great if put_dib_block@ recognized popular extentions like BMP, PNG in supplied file_name but may be there already exist other ways to save OpenGL graphics screen content from %og in PNG format? The BMP format is way too heavyweight |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Mon Jul 15, 2019 5:00 am Post subject: |
|
|
If the filename ends in ".JPG", you'll get a JPEG file. Is that a help? |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Mon Jul 15, 2019 9:19 am Post subject: |
|
|
JPG could be useful in some cases, good suggestion, thanks. Great would be to have lossless and one of the most popular in science and engineering and on the web royalty-free formats like PNG. Other lossless formats as BMP and PCX are now rarely used.
Last edited by DanRRight on Thu Jul 18, 2019 2:03 am; edited 1 time in total |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Wed Jul 17, 2019 11:38 pm Post subject: |
|
|
what about .svg scaled vector graphics ?
recently introduced and with a stand-alone .svg files manipulator included !
se: https://silverfrost.com/ftn95-help/clearwinp/gdialog/svg.aspx
Is this the way ftn9 is going ?
there's also .ps which is scaleable and widely used within SimDem-Simfit the 'sister graphics progs' to ftn95/clearwin.
I'd have thought Silverfrost QA would have a dab�tabase of file types/sizes generated for a set of test programs _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Thu Jul 18, 2019 5:25 pm Post subject: |
|
|
I never used these formats or seen anyone use them. May be SVG is interesting but i need to look and try.
By the way there are a lot of examples in this website. But i tried to compile one from OpenGL Animation and got this report Code: | 0118) CALL glBegin(GL_LINES)
0119) CALL glColor3fv(white_colour)
0120) CALL glVertex2d(-scale,0d0)
0121) CALL glVertex2d(scale,0d0)
0122) CALL glVertex2d(0d0,-scale)
0123) CALL glVertex2d(0d0,scale)
0124) k=-10
0125) WHILE(k .LE. 10) DO
*** Unpaired right bracket(s)
0296) CALL temporary_yield@()
0297) ENDWHILE
0298) END
*** Missing END PROGRAM
0130) k=k+1
0131) ENDWHILE
0132) CALL glEnd()
0133) CALL glColor3fv(red_colour)
0134) CALL glBegin(GL_LINE_STRIP)
0135) d=-10d0
0136) WHILE(d .LT. 10d0)DO
*** Variable NDWHILEALLGLEND follows another operand (possible unexpected
space?)
0139) d=d+0.05d0
0140) ENDWHILE
0141) CALL glEnd()
0142) CALL glColor3fv(green_colour)
0143) CALL glBegin(GL_LINE_STRIP)
0144) d=-10d0
0145) WHILE(d .LT. 10)DO
*** Variable NDWHILEALLGLEND follows another operand (possible unexpected
space?)
0168)
0169) IF(h.NE.0)THEN
*** Unexpected ',' in assignment
0186)
0187) IF(reason.EQ.'SETUP')THEN
*** Unexpected ',' in assignment
0192) CALL myreshape(w,h)
0193) ELSEIF(reason.EQ.'DIRTY')THEN
*** Unexpected character(s) following CALL statement
0195) window1_active=.true.
0196) ELSEIf(reason.EQ.'MOUSE_LEFT_CLICK')THEN
*** Variable LSEIF follows another operand (possible unexpected space?)
0197) CALL spinSlab(1)
0198) ELSEIF(reason.EQ.'MOUSE_RIGHT_CLICK')THEN
*** Unexpected character(s) following CALL statement
0212)
0213) IF(reason.EQ.'SETUP')THEN
*** Unexpected ',' in assignment
0218) CALL myreshape(w,h)
0219) ELSEIF(reason.EQ.'DIRTY')THEN
*** Unexpected character(s) following CALL statement
0221) window2_active=.true.
0222) ELSEIF(reason.EQ.'MOUSE_LEFT_CLICK')THEN
*** Variable LSEIF follows another operand (possible unexpected space?)
0223) CALL spinSlab(2)
0224) ELSEIF(reason.EQ.'MOUSE_RIGHT_CLICK')THEN
*** Unexpected character(s) following CALL statement
*** Too many errors
14 ERRORS [openGLAnim.FOR] - Compilation failed. |
Can you try if this is because my browsers Opera, Chrome and Brave are crazy or all users are crazy no one but few reporting anything, or the sources are just corrupted
Last edited by DanRRight on Thu Jul 18, 2019 7:29 pm; edited 1 time in total |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Thu Jul 18, 2019 6:44 pm Post subject: |
|
|
Are the line numbers "0118)" etc. in the source code or just in the listing? They should not appear in the source code.
Otherwise there must be invisible false characters in the source code. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1892
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Fri Jul 19, 2019 6:58 am Post subject: |
|
|
mecej4
Thanks for the information. On my machine the samples appear in C:\Users\xxxx\Documents\FTN95 Examples\OpenGL. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1892
|
Posted: Fri Jul 19, 2019 11:06 am Post subject: |
|
|
Paul, the example gears.f95, installed among other OpenGL examples under ...\Documents\FTN95 Examples, requires a couple of corrections to make it work with /64:
1. The integer variable w1 is used as an actual argument in several OpenGL calls as well as in the WINIO@ call at line 493. On that line, please replace 'w1' by 'INT(w1,7)' .
2. On line 474, please remove ', handle' and add a separate declaration of 'handle' with type INTEGER(7).
Last edited by mecej4 on Sat Jul 20, 2019 8:06 am; edited 1 time in total |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Sat Jul 20, 2019 7:42 am Post subject: |
|
|
Thank you. I will take a look at this. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sun Jul 21, 2019 1:38 am Post subject: |
|
|
do all the example codes get rerun (as a check) with each new release ?
As well as the codes being supplied, it would be good to have a them all compiled in a seperate section in the manuals containing each, with a brief w�exploanation and screengrab(s) of the output to be expected. _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Sun Jul 21, 2019 5:19 am Post subject: |
|
|
Dan, since you mentioned SVG, I assumed you had a graphic that was line-oriented. If I am mistaken, enlighten me.
I personally like graphics using PDF as the media. It is portable, viewable by almost every computer on the planet (including phones), and has really good (and lossless) compression, and can be printed on printers, plotters, etc. The library I use is one I developed and use with FTN95. It is NOT image oriented, meaning if you are drawing contours in a graphic window, I don't have an interface for that. PDF does like images of certain types, however...
It is for line drawing but does have specialized calls to draw (filled or unfilled) arcs, rectangles, circles. It uses the basic CalComp calls for the line drawing, and is expanded by the primitives as mentioned, and permits changing colo(u)rs.
My software products also produce JPG, BMP, and AutoCAD outputs. JPG and BMP use the DIB routines, while AutoCad is produced as a DXF file.
Bill |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Sun Jul 21, 2019 6:21 am Post subject: |
|
|
Bill, as to Adobe PDF, one famous company few years back started big war against Adobe products. I thought it will go out of business. Who could withstand Apple's hatred and ban of Flash player for example in Apple products. But looked yesterday on stock ADBE and was shocked - it goes up and up. I need any popular graphics format which are lossless, compact, accepted with Microsoft Word, Powerpoint, FTN95 and publications journals and also ideally capable of animations (like GIF89 or AVI). |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Sun Jul 21, 2019 1:27 pm Post subject: |
|
|
Dan, thanks for the explanation. |
|
Back to top |
|
|
|
|
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
|