• 0 Posts
  • 3 Comments
Joined 8 months ago
cake
Cake day: November 2nd, 2024

help-circle

  • inkeso@feddit.orgtoich_iel@feddit.orgich_iel
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    Ha! Na das nenne ich mal ne produktive Mittagspause ;p

    auflösung

    aber wie?

    Die versteckte Botschaft ist im letzten Bit pro Farbkanal…

    python

    from PIL import Image
    from numpy import array, vectorize
    i = array(Image.open("stego.png"))
    n = vectorize(lambda p: (p & 0x01) * 255)(i)
    Image.fromarray(n).save("antistego-py.png")
    

    R

    library(png)
    i <- readPNG("stego.png")
    for (p in 1:3) i[,,p] <- (i[,,p] * 255) %% 2
    writePNG(i, "antistego-r.png")
    

    imagemagick

    magick stego.png -fx "(p * 255) % 2" antistego-magick.png