TIFF : fix saving not in the current directory
useful only for tests
This commit is contained in:
parent
f026c3f04b
commit
b8bea154eb
@ -779,6 +779,9 @@ void Save_TIFF_to_memory(T_IO_Context * context, void * * buffer, unsigned long
|
|||||||
void Save_TIFF(T_IO_Context * context)
|
void Save_TIFF(T_IO_Context * context)
|
||||||
{
|
{
|
||||||
TIFF * tif;
|
TIFF * tif;
|
||||||
|
char * filename; // filename with full path
|
||||||
|
|
||||||
|
filename = Filepath_append_to_dir(context->File_directory, context->File_name);
|
||||||
|
|
||||||
File_error = 1;
|
File_error = 1;
|
||||||
|
|
||||||
@ -788,12 +791,13 @@ void Save_TIFF(T_IO_Context * context)
|
|||||||
tif = TIFFOpenW(context->File_name_unicode, "w");
|
tif = TIFFOpenW(context->File_name_unicode, "w");
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
tif = TIFFOpen(context->File_name, "w");
|
tif = TIFFOpen(filename, "w");
|
||||||
if (tif != NULL)
|
if (tif != NULL)
|
||||||
{
|
{
|
||||||
Save_TIFF_Sub(context, tif);
|
Save_TIFF_Sub(context, tif);
|
||||||
TIFFClose(tif);
|
TIFFClose(tif);
|
||||||
}
|
}
|
||||||
|
free(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user