|
From: Bastian M. <bma...@we...> - 2006-06-30 06:48:40
|
I am having problems with image.dem from CVS on OS/2. It aborts with: Damaged EDF header of demo.edf: not multiple of 512 B. Is this another case of a missing binary tag? Or is my cvs screwing up? Btw. The list of terminals supporting images at the beginning of image.dem could be extended a little. Bastian |
|
From: Daniel J S. <dan...@ie...> - 2006-06-30 07:01:02
|
Bastian Maerkisch wrote: > I am having problems with image.dem from CVS on OS/2. It aborts with: > > Damaged EDF header of demo.edf: not multiple of 512 B. > > Is this another case of a missing binary tag? Or is my > cvs screwing up? Could be. That clearly sounds like something wrong with the file. The file size I have here is 17408 bytes. Is that what you are seeing? > > Btw. The list of terminals supporting images at the beginning > of image.dem could be extended a little. Meaning that there are now more terminals that support images than is listed? Maybe we should get rid of that note at this point. Dan |
|
From: Ethan M. <merritt@u.washington.edu> - 2006-06-30 16:41:24
|
On Friday 30 June 2006 12:10 am, Daniel J Sebald wrote: > Bastian Maerkisch wrote: > > I am having problems with image.dem from CVS on OS/2. It aborts > > with: > > > > Damaged EDF header of demo.edf: not multiple of 512 B. > > > > Is this another case of a missing binary tag? Or is my > > cvs screwing up? > > Could be. That clearly sounds like something wrong with the file. > The file size I have here is 17408 bytes. Is that what you are > seeing? In fact, the file "image.dem" itself also contains in-line binary data and may possibly cause problems. Does anyone know of possible harm done by marking a file in cvs as "binary"? If not, I think we should flag both demo.edf and image.dem -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA |
|
From: Daniel J S. <dan...@ie...> - 2006-06-30 17:06:17
|
Ethan Merritt wrote:
> On Friday 30 June 2006 12:10 am, Daniel J Sebald wrote:
>
>>Bastian Maerkisch wrote:
>>
>>>I am having problems with image.dem from CVS on OS/2. It aborts
>>>with:
>>>
>>>Damaged EDF header of demo.edf: not multiple of 512 B.
>>>
>>>Is this another case of a missing binary tag? Or is my
>>>cvs screwing up?
>>
>>Could be. That clearly sounds like something wrong with the file.
>>The file size I have here is 17408 bytes. Is that what you are
>>seeing?
>
>
> In fact, the file "image.dem" itself also contains in-line binary
> data and may possibly cause problems.
>
> Does anyone know of possible harm done by marking a file in cvs
> as "binary"?
> If not, I think we should flag both demo.edf and image.dem
Well, the harm, if any, would be to Windows users. I'm guessing most editors and applications these days handle that. The question is whether gnuplot can handle the absence of a CR or LF character (I forget which), i.e., the underlying C function.
Leaving image.dem as ASCII may be safe. It is a short little string of characters that is in binary. So long as there is no CR-LF values in the string, most likely we'd be fine. Here are the characters:
00 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 00
00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 3F
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3F
00 00 00 02 02 00 02 02
CR is 0D and LF is 0A, so it should be safe.
But, perhaps you can suggest a technique for using actual piping, since you know that so well. Here is the command
plot '-' binary endian=little array=2x2 dx=2 format="%float" using 1:2:3 with rgbimage,\
'-' binary endian=little record=4 format="%char" using 1:2 with points pt 7 ps 2 lt -1
Maybe there is something '| < blutux.rgb' that could be used that would work in both Linux and Windows? Suggestions?
Dan
|
|
From: Ethan M. <merritt@u.washington.edu> - 2006-06-30 17:12:36
|
On Friday 30 June 2006 10:15 am, Daniel J Sebald wrote: > Leaving image.dem as ASCII may be safe. I've just flagged it as binary. I guess we'll see if there are any complaints. > Maybe there is something '| < blutux.rgb' that could be used that > would work in both Linux and Windows? Suggestions? It was my understanding that only certain flavors of Windows build understood pipes. So I don't think this is possible in general. But I also don't think it is an important part of the demo. We explain pipes and piped input in other places, and I don't see anything very special about this place in particular. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA |
|
From: Daniel J S. <dan...@ie...> - 2006-06-30 17:40:42
Attachments:
imagedem-djs-30jun2006.patch
|
Ethan Merritt wrote: > On Friday 30 June 2006 10:15 am, Daniel J Sebald wrote: > >>Leaving image.dem as ASCII may be safe. > > > I've just flagged it as binary. I guess we'll see if there are > any complaints. > > >>Maybe there is something '| < blutux.rgb' that could be used that >>would work in both Linux and Windows? Suggestions? > > > It was my understanding that only certain flavors of Windows build > understood pipes. So I don't think this is possible in general. > But I also don't think it is an important part of the demo. > We explain pipes and piped input in other places, and I don't see > anything very special about this place in particular. Mainly to illustrate that it works for binary data as well as ASCII, which is a big use in my mind. (I.e., that your bigger application can pipe binary data across to gnuplot.) And, of course, for having an example in the demos for purposes of verification when testing gnuplot... I suppose this example wouldn't exactly have to be under "image", but that is the way things evolve, I guess. Speaking of which, probably the text below can be removed from image.dem. There is nothing uniqe about image.dem as far as knowing how to set an output terminal. Although, it is nice to have that reminder of set output '| display png:-'". Dan |