GIMP and dithering color reductions for B/W “portraits”

The many faces of Rocco: in my 2013 tests in Gimp, the image is 150 pixels wide by 154 pixels high  The image is used with the kind permission of Rocco’s owner. I have used this image before, when I posted previously on some ways to reduce colored images to B/W for possible knitting using a Mac computer, please see post on 013/03/14/ color-reduction- conversions-mac-os/. Gimp offers some alternatives to the familiar dithers and is available, free, for both PC and Mac platforms. Tutorial links on Gimp edge detection available online as of May 2019 are listed at bottom of the post.

Image_Mode_Indexed_ one bit black: immediate result, too dark

Threshold adjustments may not be made in indexed images to alter the above image, so it’s back to greyscale. Reductions to greyscale may be achieved through Image_ Mode_ Greyscale or choosing Colors_Desaturate_OK options. Desaturation offers additional choices

Image_Mode_GreyscaleColors_Desaturate_OKRocco desaturated, in “knittable portrait size”using edge detection and its algorithmsDifference of Gaussians

what happens if in addition color_ invert is used with Robertsadjusting B/W with Thresholdafter a bit of “tweaking” Image_Mode_Indexed, rendering it “knittable in 2 colors” getting silly with filling the ground with pattern behind the floating head

2021: the latest, December 2020 updated version of Gimp for Mac OS
Gimp dithering controls easily accessible with mode changes to indexed I found I got the best results adjusting the contrast in the original greyscale image prior to changing its mode to indexed and dithering (Floyd_Steinberg, normal)  Dithering options in Gimp 2.10 may be found at the bottom of the colors menu This filter can reduce the number of colors in an image by reducing the levels per channel (colors and alpha). Different dithering methods can be specified to counteract quantization-induced banding.
Presets are common features for many Colors commands.
Red levels, Green levels, Blue levels, and Alpha levels sliders set the number of levels for the respective red, green blue, and alpha channels.
Dithering method: can specify the dithering method to use
None: no dithering will be performed
Floyd Steinberg: the most commonly used method of dithering, and the default for this filter
Bayer: the algorithm is characterized by noticeable cross-hatch patterns in the result
Random, random covariant: use randomization of the pixel values to reduce the number of colors
Arithmetic variants are based on magic numbers and arithmetic
Blue noise variants are sometimes thought to be the least distracting
Random and new seeds are two random dithering methods.
When converting to indexed colors with the image unaltered, and using positioned dithering, the last option Hyperdither: options offered  default Jarvis
default Stucki
online, options https://ditherit.com it is possible to choose from multiple palettes Sierra dither

5/4/2019 Other than GIMP: after straightforward load, convert, and save, with no other adjustments, images shown in approximately 150 pixels/sts in width, no significant change results with conversion to color B/W indexed
http://gazs.github.io/canvas-atkinson-dither/
online, default settings https://29a.ch/2016/08/04/ditherlicious-1-bit-image-dithering
Check dithered results, downloaded images may be in RGB Mode. Prior to any knitting, they will need to be converted to B/W indexed.
Looking for ways to reduce the noise in dithered images I tried this conversion in XnSketch, using the photocopy effect,  beginning with the colored image of Rocco, the results: imported the result into Gimp and saved it in indexed  2 color BW and in turn, 3 color indexed mode, no color adjustments, finding the result pleasantly simple beginning with the greyscale generated image followed by Mode changes in Gimp, indexed 2 color BW, then indexed 3 color, there appear to be very subtle differences with a bit more detail: Another online resource with an extensive array of dithering options https://app.dithermark.com. Here are 2 conversions using the app, the images are 2 color B/W. The presence of a third color is an illusion created by the difference in the distribution of BW color pixels, they loaded fine as viewed for knitting in Ayab, and in img2track, once I remembered to change its setting to 2 color knitting from the last used one at 4 colors It is possible to reduce images to 4 or 3 colors using the program as well: a slider for color count is used to choose the final number of colors in the reduction. Again, these instances have no added manipulation A series of dithers:
To retain the quality and size of the dithered image, download it, rather than using a screen grab. The software used to separate the chosen dither may alter the result somewhat. I am writing my posts using an iMac M1 with OS 12.0.1. At this point Ayab is not operable, img2track does open images, but in this case, with interesting distortions, and it does not download any files at all. Yet another dithering tool, allows one to draw in dithering mode using a variety of patterns and will dither images. In the latter instance, there is no real opportunity to tweak or alter the result shapes drawn using a few of the large variety of offered patterns: 

2023 working with pattern fills and removing any background 

In this instance, a portrait of a dog wearing a sweater image was generated in Midjourney and scaled to 191X195 pixels.
Dithering online apps were used to reduce the colors in instants to 4, 3, and 2.
The greyscale image was also color reduced and dithered in Gimp.
All results were not adjusted further in any way.
Color reductions could be tweaked a bit further prior to actual knitting.
Magnifying the chosen individual result will help visualize the change in resolution quality of the image in the final knit piece.

 

Illusion /shadow knitting DIY designs_HK

I have played with excel (and Numbers) before to create charts for various fabrics requiring color separations. My latest efforts relating to this knit group have gone in a different direction; I have also attempted to simplify the technique in terms of following the instructions for knitting them. This sample began with the use of Intwined to create the document and graphs. The first chart is set up with alternate row color striping, color 1=dark, color 2 = light. Blank-colored squares are used as knit symbols, and horizontal dash for the symbol for purl stitches. Beginning on light-colored, even-numbered rows, the design is marked in purl stitches. On odd-numbered rows beginning with row 1, mark all empty squares in the even-numbered light-colored row immediately above it with purl symbols. All unmarked stitches throughout the design are knit, whether, on the “wrong/right” sides, all dashes are purled, patterning occurs on the second row of each color. To visualize the full pattern one may use the add row below feature to expand the graph (the chart below is missing the very first row). Now add the second row of each color and grounding stripe (s) at bottom of the repeat. Most patterns will start the illusion immediately after casting on with dark color, row 1 above. I was interested in my sample having a border of sorts on its top and bottom. The resulting knit swatch shadow sideIntwinded had the capacity for building row by row written instructions for patterns, but there were discrepancies on some rows for these charts, and I opted not to include them.
Note: the program quickly became buggy, unsupported, and unusable on the Mac during the remainder of 2013.

Another program I have just acquired and begun to use is GIMP; it is free, and now also available for use in Mac OS Mountain Lion. Both Gimp and Photoshop make it possible to design using single-pixel pencil and grids to build motifs from scratch as well as gridding of preexisting images. I have a different method for these fabrics using GIMP, which is easier for more complex, overall shapes. The same series of steps may be used for mosaic knitting (the color inversion sequence is different). Below are images generated for a different illusion pattern, I will share my “how-to” for designing the motifs later, referencing mosaics and mazes. To achieve such motifs one is drawing in magnification of multiple hundreds and more, there is no way to number within a one-pixel space, so these charts as generated are lacking numbers for stitches and rows, one drawback. Another is that this color inversion works only in black and white. One advantage: the proper repeat may be cropped and saved with the grid removed in various formats that may be used to import to various machine knitting download programs, and gridded may be used to establish punchcards or mylar repeats.  Screengrabs of magnified charts were saved, and are shown below. Black squares represent purl stitches in the second row of each color. The first row of each color is always knit, not represented in these charts
The red squares are guidelines for no color inversion rows, the yellow ones isolate the repeat the actual repeat color inversion begins on row 1 and follows every other row (if numbered these would be odd rows)  testing the repeat through filter/ map/ tile a working chart that can be printed to suit with dark/light row markings and blank squares for tracking knitting rows in the execution of the pattern A larger version with stitch and row counts marked. The chart represents half the rows in the actual knit. The cast on row counts as knit row 1, color 1, and following the chart beginning with row 2 knit the black squares and purl the white squares. *Change color, knit one row (odd#), on the next row follow the chart, knitting the black squares and purling the white (even#).** Repeat from * to **. the knit swatch: “shadow side” its reverse side for online tutorials, patterns, and inspiration see Woolly Thoughts

Feb 18, 2017, I have recently become curious about creating illusions such as these in crochet, am developing ideas, and returned to this chart. The image below is intended to have symbols and notes superimposed on it. It shows the tiling in a different way, so I thought I would add it to this post as well. Repeats are highlighted with darker borders. The repeat on the right needs to be trimmed if the goal is to achieve matching edges. Row counts on the right would differ in knitting, the plan is to execute this pattern in Tunisian crochet, which handles rows in a very different manner than knitting or standard crochet. Follow up: 2017/03/06/illusion-DIY-patterns-in-crochet/

2/2019 from the first in a series of posts on geometric shapes on ribber fabrics using tuck settings, a mock variation with the ribber set for knitting in both directions throughout, and the main bed set to tuck in both directions:

Multiple downloadable pngs for optical illusion designs may be found in the 2023 post on Developing tiled repeats suitable for multiple stitch types, including tuck

2024 the process described in More separations for various knits using Gimp, color to alpha was used on this file, beginning with the 24X28 PNG The initial separated design, also 24X28,  tiled X6, rendered double length to 24 X56 for knitting with color changes every 2 rows   tiled X6 Developing a circular design using the same approach a 24X24 repeat color separated 24X24 double height 24X48 A single row height brick repeat, developed in ArahPaint, also 24X48 double length, 24X96   its half crop companion, 48X24 double height, 48X48