|\ /|     scroll down for older posts.
= o.o =

Dienstag, 21. November 2017

audiotools

I started to write tools for testing and measuring audio equipment. Any help is welcome. https://github.com/w33zl3p00tch/audiotools

Samstag, 7. Oktober 2017

New Server, New Blog?

I'm mainly posting this to see some search engine traffic on my new server. I am trying out a promising blog software written in Go, called Hugo. The domain name will very likely change in the near future: https://godev.goip.de

Samstag, 3. Juni 2017

gdzip released

I humbly announce the release of gdzip.
Gdzip is a command line tool to compress and encrypt files or folders. It is written in Go.

Executable binaries as well as the source code can be downloaded at Github:
Source code: https://github.com/w33zl3p00tch/gdzip
Releases: https://github.com/w33zl3p00tch/gdzip/releases

Internally, the given files and/or folders are compressed and stored as tar.gz archives that retain the original file metadata.
The data are split into chunks while encrypting, and encryption is done done using AES256-GCM and/or ChaCha20-Poly1305. All this happens in RAM, so no temporary files will be used.

Keys are generated using the scrypt key derivation function.

The encrypted files provide no information about their contents or their contents' filenames.

Encrypted files may be safely renamed and even the extension may be altered or left out.

Please report any bugs you might find. Suggestions and feature requests are welcome.

Donnerstag, 1. Juni 2017

Sieve of Eratosthenes in Python

I've recently discovered the magic of hash tables. Here is a version of the Sieve of Eratosthenes that is pretty fast, given it's written in Python:

Sonntag, 6. November 2016

Portrait Viktoria

Portrait Viktoria Monhor, digital painting, 2016

Montag, 31. Oktober 2016

Some thoughts that might be useful for painters



The best book about painting technique I have read is Kurt Wehlte's "Werkstoffe und Techniken der Malerei".


Palette:

All you'll ever need to paint a realistic painting is a small set of colors. Frans Hals used these:

Black, Red, Ochre, White. That's it.

For ambitious paintings that require lots of different colors I recommend the following travel-friendly palette:

Light Ochre (be sure not to buy a color that has been mixed with white.)
Raw Umber (may be greenish)
Cadmium Red (very strong, be careful with it; take a middle or dark hue)
Ultramarine Blue (dark, can always be mixed with white for light blue)
Titanum White (it is opaque)
Bone Black

Optional colors:

Burnt Sienna (may be achieved by mixing Umber, Ochre and a bit Red)
Burnt Umber (warmer color)
Scarlet Lake (the Naphtol Azo Version; natural scarlet lake is rarely sold; useful for reddish skin tones and lips)
Cadmium Yellow (most of the time, ochre mixed with white is yellow enough)
Chrome-oxide-hydrate Green (most other green hues can be mixed from blue and ochre/yellow)
Zinc White (translucent; aids as UV filter by turning UV light into visible light; useful for brightening lightly)

- Umber contains manganese; it aids as siccative in oil painting, which means it makes the colors that are mixed with it dry faster. If you are using lots of umber, your painting may be dry to the touch within one or two days, as opposed to Zinc White, which takes weeks to dry.


Colors:

If you want to work fast or are travelling, acrylic colors work best. Good acrylic colors are even useful as watercolors. Good colors are composed of only one single pigment and acrylic resin without filler. Excellent brands (in descending order of quality): Golden Acrylics, Liquitex, Schmincke.
Oil colors are mostly of good quality, regardless from which company they come from. But if you want to work with the best possible colors, you'll sooner or later buy "Michael Harding's artists colours" or make your own.

Samstag, 29. Oktober 2016

http://viktoriamonhor.com

Sonntag, 23. Oktober 2016

Marie Lienhard, Plaisirs et terreurs de la lévitation, left part, pencil on paper, 42 x 60 cm

Sadly, I cannot afford it at the moment. I would have bought it on the spot. Marie's homepage:

Sonntag, 16. Oktober 2016

Dichtung nach Celan

Dem lieben Gottfried Benn wurde einst die Frage gestellt, ob Dichtung das Leben bessern könne. Ich erlaube mir, die Frage zu stellen, ob das Leben das Leben bessern könne.

Wer schweren Gemüts ist, überspringe das folgende.



Einst wurde ein Polizeibeamte zum Ort eines Autounfalls gerufen.
Glimpflich verlief das Desaster für fast eine ganze Familie.
Die letzten Worte, ausgesprochen von der kleinen Tochter, gefangen im Drahtzaun, waren:
"Kitten in a blender..."

Sonntag, 2. Oktober 2016

Farewell, Linux! Welcome, FreeBSD!


Most Linux distributions have never been elegant operating systems. Under the hood they carry a metric crapton of kludge. (Please pardon my Spanish.)

systemd is a disaster. Nothing can fix that. Here is the newest SNAFU:
https://www.agwa.name/blog/post/how_to_crash_systemd_in_one_tweet

There are more secure (http://www.openbsd.org) and elegant (https://www.freebsd.org) options to consider. Let's hope they won't get too popular with the greedy corporations that rode Linux into the mess it sits in.

FreeBSD, by the way, is excellently documented, and I learned more about UNIX by testing it than 11 years of professional experience with Linux could ever teach me.

And demonettes are by far sexier than a fat penguin. *tips fedora*

Sonntag, 25. September 2016

untitled, acrylic on cotton, 40 x 50 cm

Freitag, 26. August 2016

Nearest Mean Interpolation: a method to scale up images

Here is a nice and clean method of scaling up an image to double its size:

screenshot of a comment in pepperpickle's source code




































I found it in the research paper that describes the HCRHide image steganography algorithm: https://www.researchgate.net/publication/272307744_A_high-capacity_reversible_data_hiding_method_HCRHide

The main quality of this algorithm is that the original image can be reconstructed without any loss of color information. Pixels a, b, c and d are taken from the original image. the three lambda-pixels we get for each original pixel can be used to store information steganographically. Here is my golang implementation of the NMI scaling-algorithm:

// scaleNMI scales up an image using the NMI method (Nearest Mean
// Interpolation)
/*
Here is how NMI works:
four neighbouring pixels of the original image are obtained:
 _________
|    |    |
| a  | b  |
|____|____|
|    |    |
| c  | d  |
|____|____|

between those pixels, new ones are inserted:
 ______________
|    |    |    |
| a  | λ₁ | b  |
|____|____|____|
|    |    |    |
| λ₂ | λ₃ | λ₄ |
|____|____|____|
|    |    |    |
| c  | λ₅ | d  |
|____|____|____|

The color values for the new pixels are calculated using the following
formulae:

λ₁=(a+b)/2
λ₂=(a+c)/2
λ₃=(a+b+c+d)/4

Those are calculated in the next pixel set as λ₁ and λ₂:
λ₄=(b+d)/2
λ₅=(c+d)/2

The original formula for λ₃ is:
λ₃=(a+λ₁+λ₂)/3

Per pass, the image is scaled up to double its size.
*/
func scaleNMI(src image.Image) image.Image {
        bounds := src.Bounds()
        w, h := bounds.Max.X, bounds.Max.Y
        dest := image.NewRGBA(image.Rect(0, 0, w*2, h*2))
        dX, dY := 0, 0

        for x := 0; x < w; x++ {
        for y := 0; y < h; y++ {
        a := src.At(x, y)
        b := src.At(x+1, y)
        c := src.At(x, y+1)
        d := src.At(x+1, y+1)

        if x > w-2 {
        b = a
        d = a
        }
        if y > h-2 {
        c = a
        d = a
        }

        aR, aG, aB, aA := a.RGBA()
        bR, bG, bB, bA := b.RGBA()
        cR, cG, cB, cA := c.RGBA()
        dR, dG, dB, dA := d.RGBA()

        l1R, l1G, l1B, l1A :=
        ((aR + bR) / 2), // >> 1: divide by 2
        ((aG + bG) / 2),
        ((aB + bB) / 2),
        ((aA + bA) / 2)
        l2R, l2G, l2B, l2A :=
        ((aR + cR) / 2),
        ((aG + cG) / 2),
        ((aB + cB) / 2),
        ((aA + cA) / 2)
        l3R, l3G, l3B, l3A :=
        ((aR + bR + cR + dR) / 4), // >> 2: divide by 4
        ((aG + bG + cG + dG) / 4),
        ((aB + bB + cB + dB) / 4),
        ((aA + bA + cA + dA) / 4)

        dest.Set(dX, dY, color.RGBA{
        uint8(aR / 256), // >> 8 divide by 256
        uint8(aG / 256),
        uint8(aB / 256),
        uint8(aA / 256)})
        dest.Set(dX+1, dY, color.RGBA{
        uint8(l1R / 256),
        uint8(l1G / 256),
        uint8(l1B / 256),
        uint8(l1A / 256)})
        dest.Set(dX, dY+1, color.RGBA{
        uint8(l2R / 256),
        uint8(l2G / 256),
        uint8(l2B / 256),
        uint8(l2A / 256)})
        dest.Set(dX+1, dY+1, color.RGBA{
        uint8(l3R / 256),
        uint8(l3G / 256),
        uint8(l3B / 256),
        uint8(l3A / 256)})

        dY += 2
        }
        dY = 0
        dX += 2
        }

        return dest
}