Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing needed: only use image loaders which could potentially read file #17368

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/common/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@ extern "C" {
/** return value of image io functions. */
typedef enum dt_imageio_retval_t
{
DT_IMAGEIO_OK = 0, // all good :)
DT_IMAGEIO_FILE_NOT_FOUND, // file has been lost
DT_IMAGEIO_LOAD_FAILED, // file either corrupted or in a format not supported by the current loader,
// and a more detailed error from among those below is not available.
DT_IMAGEIO_OK = 0, // all good :)
DT_IMAGEIO_FILE_NOT_FOUND, // file has been lost
DT_IMAGEIO_LOAD_FAILED, // file either corrupted or in a format not supported by the current loader,
// and a more detailed error from among those below is not available.
DT_IMAGEIO_UNSUPPORTED_FORMAT, // the file type is not supported; may be one which is a build-time option
DT_IMAGEIO_UNSUPPORTED_CAMERA, // the file type is supported, but the camera model is not
DT_IMAGEIO_UNSUPPORTED_FEATURE, // the file uses an unsupported feature such as compression type
DT_IMAGEIO_FILE_CORRUPTED, // invalid data was detected while parsing the file
DT_IMAGEIO_IOERROR, // a read error occurred while loading the file
DT_IMAGEIO_CACHE_FULL // buffer allocation for image data failed
DT_IMAGEIO_CACHE_FULL, // buffer allocation for image data failed
DT_IMAGEIO_UNRECOGNIZED // file format was not recognized by loader(s)
} dt_imageio_retval_t;

typedef enum dt_imageio_write_xmp_t
Expand Down
2 changes: 2 additions & 0 deletions src/develop/develop.c
Original file line number Diff line number Diff line change
Expand Up @@ -3547,6 +3547,8 @@ void dt_dev_clear_chroma_troubles(dt_develop_t *dev)

void dt_dev_reset_chroma(dt_develop_t *dev)
{
if(!dev)
return;
dt_dev_clear_chroma_troubles(dev);
dt_dev_chroma_t *chr = &dev->chroma;
chr->adaptation = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/develop/imageop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ gboolean dt_iop_so_is_hidden(dt_iop_module_so_t *module)

gboolean dt_iop_is_hidden(dt_iop_module_t *module)
{
return dt_iop_so_is_hidden(module->so);
return !module || !module->so || dt_iop_so_is_hidden(module->so);
}

gboolean dt_iop_shown_in_group(dt_iop_module_t *module, uint32_t group)
Expand Down
Loading
Loading