knime-ip / knip

KNIME Image Processing Extension
https://www.knime.com/community/image-processing
50 stars 11 forks source link

Color information lost when writing certain file formats #303

Open gab1one opened 8 years ago

gab1one commented 8 years ago

Writing multi-chanel images .jpg and .png files with the image writer node results in those images being single channel instead of multi channel (gray scale).

Steps to reproduce:

beschu commented 7 years ago

I created a workflow that checks for this bug and placed it on mekur. It is named: color-info-lost-3channelRGB-jpg-issue303

I took the above mentioned image series and tested it: Writing as a jpg is lossy, hence we need measurement to see if images are the same regardless of lossy writing.

My idea was:

With that approach i couldn't reproduce this bug and everything seems to be fine.

tibuch commented 7 years ago

Thanks!

dietzc commented 7 years ago

I don't understand. The problem seems to be that a dimension is either lost or added, not about lossy content at all. Can you confirm that the dimensionality of the written image and of the image read back to KNIME are the same?

tibuch commented 7 years ago

@dietzc @beschu and I looked at the workflow of @beschu. The written jpg files get read again and there are no issues with the dimensions. Looks like this bug got fixed somehow or @gab1one meant something different?

tibuch commented 7 years ago

@beschu and I just encountered the following problems:

dietzc commented 7 years ago

What we read shouldn't be an issue at all, as we transform the image (at the moment) anyway to our internal data-format. The dimensionality of the image after having it read it is way more important. Can you therefore please reproduce the problem with the Image Generator (which creates exactly the same type of images you would get when reading in the png) and create two reproducing workflows + open issues accordingly, if not already opened? All this cross-referencing of issues gets a bit confusing.

tibuch commented 7 years ago

I agree that not reading the images is the problem. As far as I can tell it is a writer problem. We only use the readers to see the result of the writer.

beschu commented 7 years ago

I created the two reproducing workflows and opened the issues here:

446 Write UnsignedByteType as jpg

447 Write UnsignedByteType as png

dietzc commented 7 years ago

can we close this issue then?