Hello Denis,
since I implemented the writeFrame method for the writer of tiff format plugin, files that do not have extensions are automatically generated in tiff format and not in GIS anymore.
The issue occurs because tiff plugin format is registered before the GIS format in the format map and found first during the call to the Finder::check() method (//depot/aimsdata/3.1/src/aimsdata/io/finder.cc - perforce version 1 - line 348).
To fix this issue, I think we need to add finder priority for formats (and GIS will have the highest priority value). According to you, is it a good idea to implement this ? Do you think that another solution would be better ?
It is possible to view the issue using the following command :
AimsFileConvert -i test.ima -o output_test
Nico
[Writers] - Issue while writing images with no extension
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Re: [Writers] - Issue while writing images with no extension
Hi Nico,
This priority already exists: see in Finder, the registerFormat() method accepts an optional arg "before" which allows to register a format before another existing one. It is a bit strange, however, that the TIFF format (which is a plugin which registers after the builtin GIS) gets a higher priority than GIS. I'll check this...
Denis
This priority already exists: see in Finder, the registerFormat() method accepts an optional arg "before" which allows to register a format before another existing one. It is a bit strange, however, that the TIFF format (which is a plugin which registers after the builtin GIS) gets a higher priority than GIS. I'll check this...
Denis
Re: [Writers] - Issue while writing images with no extension
Hello Denis,
Thank you for your answer. Could you just check that the changes made in changelist n° 29298 is ok for you ? For me it works better like this, but I'd like to be sure it is right for you.
Moreover, I fixed the issue in the case where the output file has no extension, but I think priorities are not used in other blocks of the method Writer<T>::write (file : //depot/aimsdata/3.1/src/aimsdata/io/writer_d.h).
Nico
Thank you for your answer. Could you just check that the changes made in changelist n° 29298 is ok for you ? For me it works better like this, but I'd like to be sure it is right for you.
Moreover, I fixed the issue in the case where the output file has no extension, but I think priorities are not used in other blocks of the method Writer<T>::write (file : //depot/aimsdata/3.1/src/aimsdata/io/writer_d.h).
Nico