Page 1 of 1

Error with ICM files [RESOLVED]

Posted: Thu Sep 15, 2011 7:34 am
by maximeseguin
When I'm trying to open ICM files, CC say :
"An error occured while loading 'test' : Wrong file type (check header)"

My test file (test.icm) is :

Code: Select all

#CC_ICM_FILE
FILENAME=porte.asc
FILETYPE=ASC
IMAGES_DESCRIPTOR=photos.wrl
The header seem's to be coorect.

Any idea?

--
Maxime SEGUIN
École Nationale des Sciences Géographiques

Re: Error with ICM files

Posted: Thu Sep 15, 2011 12:45 pm
by daniel
Hello,

are you trying to do this on Linux? I checked the code and I saw that the comparison between the first line in the file and what is attended (#CC_ICM_FILE) is a bit harsh (it includes also the 'carriage return' character (which is never a good idea, as it is not the same for Unix and Windows systems).

I changed this (trunk version). Let's hope it's the source of this error (otherwise, don't hesitate to send me your example file).

Re: Error with ICM files

Posted: Thu Sep 15, 2011 12:59 pm
by maximeseguin
No, I'm trying to do this under Windows system.

Re: Error with ICM files

Posted: Thu Sep 15, 2011 1:27 pm
by daniel
Oh, it may also come from your text editor. Can you still test this with the new CC version on the trunk? (or do you need an executable?)

Re: Error with ICM files

Posted: Thu Sep 15, 2011 1:47 pm
by maximeseguin
Ok, I'm using Notepad++ to force utf8 encoding.
I'll try the new version of the trunk in the afternoon.
I'll keep you in touch.

Re: Error with ICM files

Posted: Thu Sep 15, 2011 2:56 pm
by maximeseguin
I've compiled the trunk, but I've still the same error message.
I don't know what happens.
Can I have a builded executable?
Do it works on your side?

Re: Error with ICM files

Posted: Thu Sep 15, 2011 3:39 pm
by daniel
It works with my own ICM files, but please send me yours: daniel.girardeau@gmail.com (or add it as an attachment to your reply).

Re: Error with ICM files

Posted: Thu Sep 15, 2011 4:26 pm
by daniel
Ok, so it appears that it was a 'unicode' encoded text file (UTF8 exactly) while CloudCompare doesn't handle such enconding styles. It needs pure 8bit ANSI (such as what the classical Notepad tool generates).

I'll try to figure out if Qt could help CloudCompare be more 'subtle'... meanwhile, don't use any other encoding than "ANSI" in Notepad++ (or any other text editor).