File:Amiga HAM8 demo image.png
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this preview: 800 × 600 pixels. Other resolutions: 320 × 240 pixels | 640 × 480 pixels | 1,024 × 768 pixels | 1,280 × 960 pixels | 2,560 × 1,920 pixels.
Original file (2,560 × 1,920 pixels, file size: 99 KB, MIME type: image/png)
File information
Structured data
Captions
Summary[edit]
DescriptionAmiga HAM8 demo image.png |
English: Demo image for the Commodore Amiga 320x200 HAM8 graphics mode, based on File:White-fronted bee-eater (Merops bullockoides) Namibia.jpg. (The bird's colors are more vivid here than in the source image because the source is in Adobe RGB color space.)
|
Date | |
Source | Own work |
Author | Morn |
Python code for initial conversion to 24-bit IFF-ILBM[edit]
# Convert a PNG file to 24-bit IFF-ILBM
import pygame
img = pygame.image.load("320px.png")
# image width and height
W, H = img.get_size()
def bit16(i):
return [i // 256, i % 256]
w1, w2 = bit16(W)
h1, h2 = bit16(H)
def bit32(i):
h = "%08x" % i
w = [h[k:k+2] for k in (0,2,4,6)]
return [int(q, 16) for q in w]
form = [
70, # F
79, # O
82, # R
77, # M
]
ilbm = [
73, # I
76, # L
66, # B
77, # M
66, # B
77, # M
72, # H
68, # D
0, # s
0, # i
0, # z
20, # e
w1, # wid 1
w2, # wid 2
h1, # hei 1
h2, # hei 2
0, # xor 1
0, # xor 2
0, # yor 1
0, # yor 2
24, # planes
0, # mask
0, # compression
0, # pad
0, # trans1
0, # trans2
10, # x aspect
11, # y aspect
w1, # x wid1
w2, # x wid2
h1, # y hei1
h2, # y hei2
66, # B
79, # O
68, # D
89, # Y
]
p = []
def bit_at(x, y, col, b):
c = img.get_at((x, y))[col]
c = ( c >> b ) & 1
return c
for y in range(H):
for col in 0, 1, 2:
for b in range(8):
line = []
for x in range(W):
line.append(bit_at(x, y, col, b))
for n in range(0, W, 8):
bb = "".join([str(q) for q in line[n:n+8]])
p.append(int(bb, 2))
out = ilbm + bit32(len(p)) + p
out = form + bit32(len(out)) + out
out = bytearray(out)
g = open("i24.iff", "wb")
g.write(out)
g.close()
Licensing[edit]
I, the copyright holder of this work, hereby publish it under the following license:
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.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 16:48, 20 August 2022 | 2,560 × 1,920 (99 KB) | Morn (talk | contribs) | sharpen image after downscaling | |
12:35, 20 August 2022 | 2,560 × 1,920 (98 KB) | Morn (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
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.
Unique ID of original document | xmp.did:d560e990-eddd-418c-a3da-c72f04d16daa |
---|---|
Software used | GIMP 2.10 |
Horizontal resolution | 28.35 dpc |
Vertical resolution | 28.35 dpc |
File change date and time | 15:57, 20 August 2022 |
Structured data
Items portrayed in this file
depicts
20 August 2022
image/png
50202f21b62216b05b6f8de721fee0d6142e82c9
101,151 byte
1,920 pixel
2,560 pixel
Hidden categories: