Skip to content

More coherent image validation #5650

Open
@BartChris

Description

@BartChris

Is your feature request related to a problem? Please describe.
The validation of images in Kitodo should be implemented more coherently and be enhanced. What seems to be implemented are mostly checks for images which are not assigned to a structural element as part of the metadata validation

results.add(checkForStructuresWithoutMedia(workpiece, translations));
results.add(checkForUnlinkedMedia(workpiece, translations));
)
But as far as i can see, there is no real image validation implemented.

I stumbled over different problems.

  1. The checkbox "Bilder validieren" as attribute of a task in the workflow editor has no effect. Even the image validation logic in the WorkflowControllerService is not checking for that attribute when the task is closed. Instead it is checking if the Task is of type typeImagesWrite. This is confusing.

if (task.isTypeImagesWrite()) {
ImageHelper mih = new ImageHelper();
URI imageFolder = ServiceManager.getProcessService().getImagesOriginDirectory(false, task.getProcess());
if (!mih.checkIfImagesValid(task.getProcess().getTitle(), imageFolder)) {
throw new DataException("Error on image validation!");
}

  1. This validity check has a very narrow definition of what is considered as valid. (see also Image / file name 'validation' is hardcoded to specific rules and is not used for custom configurations #5007). The validity of images has probably to include more things. For example

  2. Is there any check for the actual file types? It seems that it is allowed right now to put TIFFs in a folder which was marked as JPEG-folder. I stumbled over that, when i mis-configured my test system and set the folder with the originals to JPEG instead of TIFFs. The system let me put TIFF files in the folder. I only noticed there was something wrong when i tried to use the "upload media" feature, uploaded Tiffs and no derivatives where created.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions