mirror of https://github.com/CGAL/cgal
add error message
when zlib version is < 1.2.9, it is not possible to save an image as .inr, it has to be .inr.gz no matter if zlib is available or not this commit adds an error message to help the user understand the error
This commit is contained in:
parent
3c8da31ed2
commit
adeb6b391e
|
|
@ -497,14 +497,19 @@ void _openWriteImage(_image* im, const char *name)
|
|||
#endif
|
||||
im->openMode = OM_GZ;
|
||||
}
|
||||
#if CGAL_USE_GZFWRITE
|
||||
else
|
||||
else
|
||||
{
|
||||
#if CGAL_USE_GZFWRITE
|
||||
im->fd = (_ImageIO_file) gzopen(name, "wb");
|
||||
im->openMode = OM_FILE;
|
||||
}
|
||||
#endif// CGAL_USE_GZFWRITE
|
||||
#else
|
||||
fprintf(stderr, "_openWriteImage: error: zlib version 1.2.9 or later\n"
|
||||
"is required to save in non-compressed files\n");
|
||||
return;
|
||||
#endif// CGAL_USE_GZFWRITE
|
||||
}
|
||||
|
||||
#else //CGAL_USE_ZLIB
|
||||
{
|
||||
im->fd = (_ImageIO_file) fopen(name, "wb");
|
||||
im->openMode = OM_FILE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue