Error reading line 511 - Evalglare

Dear friends, I would like one more help

Follow a step by step in the order below for HDR image calibration
1 - Cancellation of the exposure value
ra_xyze -r -o PTA_9_L.hdr > 01.hdr

2 Crop and resize
pcompos -x 2245 -y 2245 01.hdr -1000 -290 > 02.hdr
pfilt -1 -x 800 -y 800 02.hdr > 03.hdr

Projection adjustment
pcomb -f 03.hdr > 04.hdr

header editing
(getinfo < 04.hdr | sed “/VIEW/d” && getinfo - < 04.hdr ) > 05.hdr

Insert header information
getinfo -a “VIEW= -vta -vv 180 -vh 180” < 05.hdr > 06.hdr

Validity check
evalglare -V 06.hdr

When I do this validity check, the following error appears:
error reading line 511

Where can I go wrong??

Someone help me please!!

This looks OK. Can you upload the output of “getinfo +d < 06.hdr” so we can check? Also, how big is the file “06.hdr” in bytes?

Processing: 01.hdr…
Processing: 02.hdr…
Processing: 03.hdr…
Processing: 04.hdr…
Processing: 05.hdr…
Processing: 06.hdr…
Processing: PTA_9_L.hdr…

Hello Greg
The 06.hdr image is only 58 bytes long. Something is very wrong.
I checked all the images, even the 04.hdr seems to be OK. Images 05.hdr and 06.hdr seem to have problems.
The 05.hdr image is 1.46 MB, but when I try to open it in hdrscope it just doesn’t open.
Follow the sequence of commands you enter and the images that were generated.

In this link are the hdr images.

Thanks for your help and attention

Hi Eliana,

Image 05.hdr opens when using ximage and seems OK (I believe it does not open in hdrscope since you do not have the VIEW line in your header information in that image). Image 06.hdr seems to have an issue indeed.

I applied the same command line than you did to image 05.hdr and was able to produce a 06.hdr image without the issue. I can also open that image in hdrscope and in ximage.
I therefore believe your command line is correct, but it might just be a problem of
your double quotes not being in the right encoding format. Are you copy-pasting your command line from another file? If yes, try to type it directly in your terminal, so that it gets the right double quotes.

I hope that solves it!


Hello Pierson,
I was actually copying and pasting the command line, but repeating the whole process typing line by line and the error remains.
When I check the information with getinfo the following message appears:
-a: cannot open
VIEW= -vta -vv 180 -vh 180: cannot open
I really can’t understand where I’m going wrong.
It is as if header information is not being entered.
Any suggestions as to what might be going on?

Thank you in advance.


I have now tried using the rcrop line as I saw in a previous post by Greg

But when I enter this command line
rcrop 1000 290 2245 2245 B1.hdr > B2.hdr
the following message appears: “rcrop: illegal crop”, as shown in the following image.

Realmente não sei entender o que pode está dando errado.



Unfortunately, there’s a bit of a mapping that needs to happen from the coordinates pcompos uses (and most other Radiance tools use) and that of rcrop, which counts picture scanlines from the top rather than the bottom. You need to use the vertical size of your image to compute a starting scanline. If your picture has 4000 scanlines for example, you would use a starting scanline of 4000-(290+2245) to get:

rcrop 1000 1465 2245 2245 B1.hdr > B2.hdr

After rcrop, you can pass through getinfo using the new -r option:

getinfo -r “VIEW= -vta -vv 180 -vh 180” < B2.hdr > B3.hdr

which will replace the original view with the one above. You don’t need the other sed command to remove the old view with getinfo -r. However, the subsequent pcomb will indent a VIEW= line that evalglare won’t like unless you use pcomb -h. Alternatively, you can combine and simplify your commands like so:

rcrop 1000 1465 2245 2245 PTA_9_L.hdr \
| pfilt -1 -x 800 -y 800 \
| pcomb -f -o - \
| getinfo -r " VIEW=" “VIEW= -vta -vv 180 -vh 180” > corrected.hdr

This eliminates the ra_xyze command, because pcomb later undoes the exposure with -o and the final getinfo command removes the indented “VIEW=” line and replaces it with the standard fisheye view.

Note that this requires you have a copy of Radiance from this past April or newer.


Hi Greg,
Thank you very much for the guidelines. Finally it worked with the rcrop command.
But unfortunately getting -r for some reason is not working. I did everything as you had guided me (following image of the script I used).
I have the latest version of RADIANCE installed on my PC (Radiance 5.4a 2022-07-17 - 1df3bb1a). Even so, getinfo -r and getinfo -a do not work.

The command lines I applied were as follows, in this order:

rcrop 313 1000 2245 2245 PTA_9_L.hdr > C1.hdr
pfilt -1 -x 800 -y 800 C1.hdr > C2.hdr
pcomb -f -o C2.hdr > C3.hdr
getinfo -r " VIEW=" “VIEW= -vta -vv 180 -vh 180” < C3.hdr > C4_cor.hdr

When I enter the evalglare command, the following appears:
evalglare -V -vta -vh 180 -vv 180 C4_cor.hdr
error reading line 511

When checking the information with getinfo from the C4_cor.hdr image, the following appears:
-r: cannot open
VIEW=: cannot open
VIEW= -vta -vv 180 -vh 180: cannot open

I’m using the latest version of Evalglare
evalglare 2.03 release 12.08.2017 by EPFL, J.Wienold

Could you give me some more guidance on what I might be doing wrong?


You may have to manually type the commands. Cut-and-paste messes up quotes and hyphens, which end up as non-ASCII “m-dashes”.

Hi Greg,
I manually typed all the characters but the error persists.

If the problem is not the characters and you are sure you are using the latest Radiance release, then I do not know why you would get this error. What does:

getinfo -r dummy < C3.hdr > junk.hdr

give you? If you get:

-r: cannot open

then you must not have the latest version of getinfo, or you are accessing an older version, somehow.

Dear Greg,
It finally worked! I don’t know why, but the problem was Daysim that I had installed on my computer. I uninstalled and everything worked.
Once again, thank you very much for the guidance, it was valuable.

Yours sincerely