Re: John Wilson PCX file format
John - get IrfanView. Aside from being the best multimedia player/viewer around, it's free! And it reads PCX format, which is an old paintbrush format. JoTz
----- Original Message ----- From: "JackOTradez" <JackOTradez@email.msn.com> To: <fractint@mailman.xmission.com> Sent: Wednesday, November 19, 2003 4:19 PM Subject: [Fractint] Re: John Wilson PCX file format
John - get IrfanView. Aside from being the best multimedia player/viewer around, it's free! And it reads PCX format, which is an old paintbrush format.
Thanks, but I tried 'em all on my awkward PCX. Eventually Paul took a look at it, and pointed out where the problem was. My book's author had goofed, and coded the PCX files in a non-standard fashion. Applying Pauls fix to my PCX files allows them to be read by almost *any* player/viewer...including that incorporated in WIN Me. Now I'm trying to understand why this fix to individual files seemingly can't be coded into the PCX write procedure. Without screwing up the image, that is. All good clean fun! John W.
John Wilson wrote:
Now I'm trying to understand why this fix to individual files seemingly can't be coded into the PCX write procedure.
Since you stated that you were doing the coding based upon Roger T. Stevens' book "Fractal Programming in Turbo Pascal", you may wish to look at the first portion of Chapter 3 (about 3 or 4 pages into Figure 3-4). The following may be why your PCX files have that value: file_no :=Copy(file_name,7,2); Rewrite(fsave); ch := $0A; <===== Password Write(fsave,ch); ch := $05; <===== Version Write(fsave,ch); ch := $01; <===== Encoding Write(fsave,ch); ch := $04; <===== Bits per pixel Write(fsave,ch); B := intRec(x1).lo; Write(fsave,B); Appendix B states that the fourth position in the file (byte 3, relative zero) should contain a value of "1" for VGA. Now if you are doing this in some other programming language, your are welcome to send the source code so I may take a look at it for you. Sincerely, P.N.L. ------------------------------------------------- http://home.att.net/~Paul.N.Lee/PNL_Fractals.html http://www.Nahee.com/Fractals/
Yes I understand this, Paul, and I thank you again for pointing out the discrepancy between the PCX's produced by the code and the requirements of the Appendix. Editing a PCX to change that fourth byte from a $04 to a $01 does indeed allow the modified files to be read by almost any viewer. Now I don't want to edit each individual PCX file, so I modified the "save_screen" section of "Fractal.tpu" to write in that $01 instead of the $04. Now I get images which can be read by any viewer...HOWEVER... The last approximately 10-20 lines of the rendered image are displaced from the correctly displayed upper part of the image. It looks as if I have upset the definition of the lower, right-hand limits, x2 and y2, and this is suspicious, because these parameters are written into the header immediately after that altered $01. Also, the unmodified PCX files *were* readable by the "retore_screen" section of the software, (but not by other readers), so that $04 goof must have been allowed for in the "restore_screen" code. It's this that I'm now searching for! John W. ----- Original Message ----- From: "Paul N. Lee" <Paul.N.Lee@Worldnet.att.net> To: <fractint@mailman.xmission.com> Sent: Sunday, November 23, 2003 11:49 PM Subject: Re: [Fractint] Re: John Wilson PCX file format
John Wilson wrote:
Now I'm trying to understand why this fix to individual files seemingly can't be coded into the PCX write procedure.
Since you stated that you were doing the coding based upon Roger T. Stevens' book "Fractal Programming in Turbo Pascal", you may wish to look at the first portion of Chapter 3 (about 3 or 4 pages into Figure 3-4). The following may be why your PCX files have that value:
file_no :=Copy(file_name,7,2); Rewrite(fsave); ch := $0A; <===== Password Write(fsave,ch); ch := $05; <===== Version Write(fsave,ch); ch := $01; <===== Encoding Write(fsave,ch); ch := $04; <===== Bits per pixel Write(fsave,ch); B := intRec(x1).lo; Write(fsave,B);
Appendix B states that the fourth position in the file (byte 3, relative zero) should contain a value of "1" for VGA.
Now if you are doing this in some other programming language, your are welcome to send the source code so I may take a look at it for you.
Sincerely, P.N.L.
participants (3)
-
JackOTradez -
John Wilson -
Paul N. Lee