File:One million dots 1080p.png
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this preview: 800 × 450 pixels. Other resolutions: 320 × 180 pixels | 640 × 360 pixels | 1,024 × 576 pixels | 1,280 × 720 pixels | 1,920 × 1,080 pixels.
Original file (1,920 × 1,080 pixels, file size: 8 KB, MIME type: image/png)
File information
Structured data
Captions
Summary
[edit]DescriptionOne million dots 1080p.png |
English: Full HD visualisation of exactly one million black dots (pixels) in 100 groups of 10000. For comparison, each tile with white or grey background contains 1000 black dots. |
Source | Own work |
Author | Cmglee |
Python source code
[edit]one_million_dots_1080p.py |
---|
import png
def draw_pixel(pixels, width, x, y, rrggbb):
offset_r = (width * y + x) * 3
pixels[offset_r ] = int(rrggbb[-6:-4], 16)
pixels[offset_r + 1] = int(rrggbb[-4:-2], 16)
pixels[offset_r + 2] = int(rrggbb[-2: ], 16)
width_1k = 19
height_1k = 106
width_10k = 10 * width_1k
height_1m = 1080
width_1m = 1920
excludess = [(18,0),(18,2),(18,4),(18,6),(18,100),(18,102),(18,104)]
skips = [2,1,2,1,2, 4, 2,1,2,1,2]
skip_cumuls = [sum(skips[:i + 1]) for i in range(len(skips))]
out_pixels = [248 for i in range(width_1m * height_1m * 3)]
height_1k_minus_1 = height_1k - 1
width_1k_minus_1 = width_1k - 1
for x_1m in range(10):
print(x_1m)
for y_1m in range(10):
for x_10k in range(10):
is_x_1m_multiple_of_2 = x_1m % 2 == 0
is_x_10k_multiple_of_2 = x_10k % 2 == 0
is_checker_grey = (x_10k + y_1m) % 2 == 0
for y_1k in range(height_1k):
for x_1k in range(width_1k):
x = x_1k if (not is_x_1m_multiple_of_2) else width_1k_minus_1 - x_1k
y = y_1k if (is_x_10k_multiple_of_2 ) else height_1k_minus_1 - y_1k
draw_pixel(out_pixels, width_1m,
x_1m * width_10k + skip_cumuls[x_1m] + x_10k * width_1k + x,
y_1m * height_1k + skip_cumuls[y_1m] + y,
'#000000' if ((x_1k + y_1k) % 2 == 0 and (x_1k, y_1k) not in excludess) else
('#eeeeee' if (is_checker_grey) else '#ffffff'))
f_out = png.Writer(width=width_1m, height=height_1m, alpha=False)
f_out.write_array(open('%s.png' % (__file__[:__file__.rfind('.')]), 'wb'), out_pixels)
|
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following licenses:
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.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
You may select the license of your choice.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 23:05, 28 August 2017 | 1,920 × 1,080 (8 KB) | Cmglee (talk | contribs) | {{Information |Description ={{en|1=Full HD visualisation of exactly one million black dots (pixels) in 100 groups of 10000. For comparison, each tile with white or grey background contains 1000 black dots. }} |Source ={{own}} |Author... |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikipedia.org
- Usage on es.wikipedia.org
- Usage on id.wikipedia.org
- Usage on tr.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Horizontal resolution | 28.34 dpc |
---|---|
Vertical resolution | 28.34 dpc |