File:Tux ECB.png
Page contents not supported in other languages.
Appearance
Tux_ECB.png (202 × 239 pixels, file size: 44 KB, MIME type: image/png)
This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionTux ECB.png |
Русский: Изображение пингвина Tux, зашифрованное в режиме простой замены (Electronic CodeBook, ECB).
Español: Imagen de Tux cifrada por método ECB. |
Date | |
Source | Tux.svg |
Author | Larry Ewing, Garrett LeSage (SVG version), Rumpelstilzchen 666 (encryption) |
Other versions | File:The ECB Penguin.png, File:Tux ecb.jpg |
Code for «encryption» |
---|
from PIL import Image
from itertools import product
from pandas import DataFrame
import random
block_size = 3
common_blocks_ecb = {tuple([(255, 255, 255)] * block_size): ((255, 80, 215), (150, 150, 150), ( 32, 223, 156)),
tuple([(253, 253, 251)] * block_size): ((169, 180, 238), (255, 142, 51), ( 35, 251, 102)),
tuple([( 2, 2, 4)] * block_size): (( 52, 44, 216), (125, 114, 71), ( 57, 12, 140))}
random.seed(42)
image = Image.open('Tux.png')
image_pixels = image.load()
pixels = [image_pixels[col, row] for row, col in product(range(image.size[1]), range(image.size[0]))]
pixels.extend([(255, 255, 255)] * ((block_size - len(pixels) % block_size) % block_size))
blocks = DataFrame([[pixels[block_count + pixel_count] for pixel_count in range(block_size)] for block_count in range(0, len(pixels), block_size)])
unique_blocks = blocks.drop_duplicates().reset_index(drop=True)
for block in unique_blocks.itertuples(index=False, name=None):
block_ecb = common_blocks_ecb.get(block)
if block_ecb is None:
block_ecb = [(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)) for _ in range(block_size)]
blocks[(blocks == block).T.sum() == block_size] = [block_ecb]
for row, col in product(range(image.size[1]), range(image.size[0])):
i = row * image.size[0] + col
image_pixels[col, row] = blocks[i % block_size][i // block_size]
image.save('Tux_ECB.png')
|
Licensing
- Larry Ewing
The copyright holder of this file allows anyone to use it for any purpose, provided that the copyright holder is properly attributed. Redistribution, derivative work, commercial use, and all other use is permitted. | |
Attribution:
Attribution |
- Garrett LeSage
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
- Rumpelstilzchen 666
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Captions
Image of Tux encrypted using the Electronic CodeBook method
Изображение пингвина Tux, зашифрованное в режиме простой замены
Imagen de Tux cifrada por método ECB
Tux<\/a>"}},"text\/plain":{"en":{"P180":"Tux"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P180 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
copyrighted, dedicated to the public domain by copyright holder<\/a>"}},"text\/plain":{"en":{"P6216":"copyrighted, dedicated to the public domain by copyright holder"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P6216 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
Creative Commons Attribution-ShareAlike 4.0 International<\/a>"}},"text\/plain":{"en":{"P275":"Creative Commons Attribution-ShareAlike 4.0 International"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":98923445,\"id\":\"Q98923445\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P275":"attribution only license<\/a>"}},"text\/plain":{"en":{"P275":"attribution only license"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":6938433,\"id\":\"Q6938433\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P275":"Creative Commons CC0 License<\/a>"}},"text\/plain":{"en":{"P275":"Creative Commons CC0 License"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P275 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
17 November 2022
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 19:29, 17 November 2022 | 202 × 239 (44 KB) | Rumpelstilzchen 666 | Uploaded a work by [http://www.isc.tamu.edu/~lewing/ Larry Ewing], [https://github.com/garrett/Tux Garrett LeSage] (SVG version), {{u|Rumpelstilzchen 666}} (encryption) from Tux.svg with UploadWizard |
File usage
The following pages on the English Wikipedia use this file (pages on other projects are not listed):
Global file usage
The following other wikis use this file:
- Usage on de.wikipedia.org
Retrieved from "https://en.wikipedia.org/wiki/File:Tux_ECB.png"