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 

.pcx support
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
Andrew



Joined: 09 Sep 2004
Posts: 232
Location: Frankfurt, Germany

PostPosted: Mon Jul 06, 2009 10:25 am    Post subject: Reply with quote

A new build is now available for download from:

http://www.ftn95.co.uk/ftn95/salflibc.zip

This is working in my test setup for a simple image using:

WRITE_GRAPHICS_TO_GIF@
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1810
Location: Sydney

PostPosted: Mon Jul 06, 2009 1:24 pm    Post subject: Reply with quote

Andrew,

The latest version works. Thank you very much for the prompt fix.

I have pcx, jpg and gif file dumping selected and get .gif is 68kb, .pcx is 177kb and .jpg is 396kb.
The gif and pcx look identical, but the jpg has some background distortion behind black text.
Certainly .gif is a good solution for technical charts, while jpg may be better for other types of pictures.

John
Back to top
View user's profile Send private message
Andrew



Joined: 09 Sep 2004
Posts: 232
Location: Frankfurt, Germany

PostPosted: Mon Jul 06, 2009 1:33 pm    Post subject: Reply with quote

There is the function:

SET_JPEG_QUALITY@

Which could affect the results with JPG (and would also affect the size of the image).
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1810
Location: Sydney

PostPosted: Thu Sep 16, 2010 8:44 am    Post subject: Reply with quote

My understanding of .gif graphics file format is that it supports 256 different colour settings. Unfortunately they appear to be different from my program's colour settings.
I have been using .gif files as screen dumps which I can easily import into other packages (eg Word) for printing and reports. For my schematic diagrams, the .gif format works very well in terms of compactness and where there are few colours.
I also have a program which generates a colour palette of about 140 different colours. Unfortunately when I dump this to a .gif file, my colour pallette does not match well the .gif file's 256 available colours. As a consequence, my colours are maped to near colours, with a lot of different colours in my rainbow becoming the same colour. What options might I have available ?
- Can I change the colour palette in the .gif file to include all of mine, or
- Can I get the list of 256 standard colours to see what I may be able to better use in my program, or
- Can we support a .png file, which I understand is the updated version of .gif with a larger colour palette ?

I'd appreciate any ideas on how to improve my graphics result

John
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Thu Sep 16, 2010 9:44 am    Post subject: Reply with quote

Yea, bmp creates huge files, pcx is outdated, jpg is lossy, and gif is proprietary and due to that is essentially not available. If developers add PNG at some point it would be great.

I also miss gif, if allowed the living gifs (animations) would be next step with this compiler but the whole gif usage was killed by greedy patent holder.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Sep 16, 2010 12:00 pm    Post subject: Reply with quote

My understanding is that gif is nolonger restricted and can be used in ClearWin+. You will need a salflibc.dll that is not too old.
Back to top
View user's profile Send private message
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Thu Sep 16, 2010 1:49 pm    Post subject: Reply with quote

In that case the ability to create animated gif files would be a very useful addition to ftn95.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Thu Sep 16, 2010 7:05 pm    Post subject: Reply with quote

There are free applications around that allow you to create gif files.These can then be imported into a ClearWin+ script.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1810
Location: Sydney

PostPosted: Fri Sep 17, 2010 1:54 am    Post subject: Reply with quote

Catch up !
.gif is no longer patented
.gif files can be created in clearwin+ (single files that is)
see history in this post
Andrew, are you the author of this capability ?
Paul, I agree that these dumps are basically a stand-alone function, but I don't have the time to write a .png dumper.
I was asking if we can get control of or access to the restricted colour palette in the .gif file. It would be good to be able to scan the screen/dump window and count the number of different colours that are in use and check if this table of most active colours could be used in the .gif palette.
I was wondering if .png is only a small change from .gif, then it may be a possible enhancement.
Again I do not have experience in writing a .gif like screen dump, with it's more complex compression. My graphics software has a virtual screen of (x,y,z,colour) and I dump to the real screen by drawing lines of the same colour.

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


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

PostPosted: Fri Sep 17, 2010 7:58 am    Post subject: Reply with quote

I was responsible for importing the jpeg functionality in ClearWin+ from public domain software. I did not write the detail of the code.

I can look at the gif code in the ClearWin+ library for you and also the png format.
Back to top
View user's profile Send private message
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Fri Sep 17, 2010 9:58 am    Post subject: Reply with quote

I have tried using EXPORT_GIF@ and with GDI graphics all is well (when used in conjunction with GET_SCREEN_BLOCK@)

However I have a problem with OpenGL graphics.

I followed a procedure that has worked fine with the export of PCX files from OpenGL graphics.

That is:-

1). call glReadPixels to get the image data into a character array (which may need some padding inserted)
2). call put_dib_block@ to write the image data to a temporary bitmap file
3). Use import_bmp@ on the temporary bitmap file

4). then either call export_pcx@ for PCX files which works fine

or call export_gif@ for GIF files which gives me this message:-

“Error 376, Attempt to delete unallocated storage”


The only difference in the code is “PCX” is replaced with “GIF”

Any ideas anyone?
Back to top
View user's profile Send private message Visit poster's website
JohnCampbell



Joined: 16 Feb 2006
Posts: 1810
Location: Sydney

PostPosted: Fri Sep 17, 2010 2:42 pm    Post subject: Reply with quote

John,

I had that same error, but the later update from Andrew on 6-Jul-2009 fixed the problem. See posts above and on previous page. Versions since then have also worked.

John
Back to top
View user's profile Send private message
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Fri Sep 17, 2010 6:28 pm    Post subject: Reply with quote

Hi John,

I'm using the salflibc.dll dated 03/07/09 , but my ftn95 is version 5.10.0

I am confused by the problem, because when I grab the image from a GDI (%gr) window it works fine. For OpenGL (%og) I effectively copy and translate the screen image into a GDI format for the Silverfrost routines, which works fine when creating jpeg, bitmap and pcx files and copying to clipboard, but not for gif.

cheers,
John
Back to top
View user's profile Send private message Visit poster's website
JohnCampbell



Joined: 16 Feb 2006
Posts: 1810
Location: Sydney

PostPosted: Mon Sep 20, 2010 1:30 pm    Post subject: Reply with quote

Back to .gif colours,
I did a scan of my screen dump and I found:
- I have 120 colours in my rainbow pallette,
- plus 3 shades of grey for the boundary plus red and green for some text.
- There are also 100 other colours which appear to be toned shades at the edge of black text
This gives a total of 225 colours in use in my rainbow screen.
I checked another type of screen shading, based on 16 shades of blue, + 3 greys + red and green, plus about 280 other shades of background text colours.
I've found these other colours, by whiteing out the primary 120 (or 16) colours of my palette and seeing what is left on the screen, which is ghosted text. Presumably this makes the text look better (?)
My aim is to get all the colours of my pallette into the .gif file.
I note that .gif files use an 8-bit character for the colour. Does that mean that there is table of 2^8 (256) possible colours ?
Is it possible to redefine the colours in this table for each .gif file, to be the first 256 colours in use on the screen ?
Better still, the 256 most used colours, then the balance is matched to the most alike in the 256 available in the table.
As I only have 225 colours active, either would work well.

Is this a possibility for .gif files ?

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


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

PostPosted: Mon Sep 20, 2010 3:33 pm    Post subject: Reply with quote

I have looked at the ClearWin+ code and there appears to be no provision for png files. Looks like it would be a major task to add this fucntionality.

I am assuming that the GIF file output from CLearWin+ is standard conforming and that the standard is available somewhere on the internet.
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