This week our challenge explores the world of image processing. You are a wildlife photographer wanting to automate the resizing and formatting of your photos, and decided to build a single workflow to handle this task. Can you make it in a way that is very flexible to accommodate different magazine requests?
Here is the challenge. Let’s use this thread to post our solutions to it, which should be uploaded to your public KNIME Hub spaces with tag JKISeason3-7.
Need help with tags? To add tag JKISeason3-7 to your workflow, go to the description panel in KNIME Analytics Platform, click the pencil to edit it, and you will see the option for adding tags right there. Let us know if you have any problems!
I initially thought 'yeah, that’s easy, there’s KNIME Image processing extension… ’ - but I was wrong.
The In’s and Out’s of this challenge once again taught me a lot about UI design (where do I put my widget nodes? for example) as well as working with image files etc.
I intentionally didn’t place the data in a folder so that people who download my workflow can interact with it and access the link Just KNIME It! | KNIME
Many people, especially in Indonesia, are not yet aware of Just KNIME It! Therefore, I’m actively promoting this initiative in Indonesia.
Among my many KNIME weaknesses, Image processing is near the top. Regardless, here’s my solution. Employs Case Switch to select output image size. Uses simple selection widget to select image type output.
For me it was challenging to get the requested features after selecting and not before. It is usable but still has some points that could be optimized.
Hello everyone,
It is possible to use any folder for input and output of images. The resized images will be saved in a newly created folder within the input directory you specifed in advance. Thanks.
Hello JKIers
This is my take to the JKI S03 CH07 episode. I should known in advance how hard the @roberto_cadili 's ‘medium jedi level’ is. Once avoided my first instinct of moving into python, when i read ‘image editing’, and kept working with KNIME nodes; it has been a good fun to explore the capabilities of ‘Image Processing’ extension’s nodes.
Thanks to the pioneer colleagues, I could solve faster some pieces of work for the challenge; I found very useful the format conversion from @rfeigel as I didn’t have previous experience working these nodes.
open component configuration dialogue and browse to an image
make choices around re-sizing and file format
close config dialogue and run component
==> processed file will be saved to workflow data area in a sub-folder “output”. Filename will include information around chosen resizing options
One issue that I encountered just for PNGs is that the Render to Image Node includes these Image Size fields that seem to apply regardless of any resizing that took place using Image Resizer Node. So e.g. if the default of 100 x 100 applies then it cuts the original image at 100 x 100,
I then tried extracting dimensions from the resized imaged and passed it in as flow variables. However there the behaviour is also weird as the image has the desired size, but there’s a lot of blank space around it…
I did take a peak into some of the other solutions when I couldnt figure it out, but everyone else seems to be doing pretty much the same…
Here’s what I mean…
Did someone encounter similar behaviour and found a solution? Or did I just screw up somewhere and kind see the forest amongst all the trees?
Hello @MartinDDDD
You are creating a png file by defining a 500x500 canvas, and dropping a smaller pixel map on the top of it.
As depending on component config, the resulting images can be different in size. The option is to save the images in a loop by defining ‘pngWidth’ / ‘pngHeight’ variables with the real size of your target output image. You can extract target image ‘dimensions’ with ‘Image Properties’ node.