I am trying to convert image BLOBs to JPEG. There is a “Binary to PNG” node, but no equivalent “Binary to JPEG”. I tried to work around this by writing the output of the Binary to PNG node to files, then reading the with the “Image Reader” and writing them back out with the “Image Writer”. However, I get a message “Image has more than 3 channels. These channels might be ignored my some formats.” and the colours of the JPEGs are distorted. Is there a better way? Are the settings of the Image Reader wrong?
can you share example data with us? That would make the process easier, if not you can take a look at the images created by the image reader, it might contain an alpha channel. You can get rid of that using a Splitter node followed by a Column Filter that filters out the alpha channel and a Merger node that recombines the images.
Did you try using the PNG Image to ImgPlus node? It has an option to override transparency values in the alpha channel.
Alternatively you could use an external tool to convert the png images to jpeg, and control that tool with KNIME, e.g. image magic’s
convert is very powerful.