2 ms·
For, um, future reference, here's a minimal[1] RGB TIFF version suitable for assembly with nasm -f bin: db 'II*',0 ; header dd if
by jasomill 6y ago
For, um, future reference, here's a minimal[1] RGB TIFF version suitable for assembly with nasm -f bin:
db 'II*',0 ; header
dd ifd ; offset to IFD
xres: dd 72,1 ; XResolution value
yres: dd 72,1 ; YResolution value
bps: dw 8,8,8 ; BitsPerSample value
data: times 100 db 0,0,255 ; image data
ifd: dw (next-ifd)/12 ; IFD entry count
dw 256,4 ; ImageWidth tag, type
dd 1 ; ImageWidth count
dd 10 ; ImageWidth value
dw 257,4 ; ImageLength tag, type
dd 1 ; ImageLength count
dd 10 ; ImageLength value
dw 258,3 ; BitsPerSample tag, type
dd 3 ; BitsPerSample count
dd bps ; BitsPerSample offset
dw 259,3 ; Compression tag, type
dd 1 ; Compression count
dw 1,0 ; Compression value, padding
dw 262,4 ; PhotometricInterpretation tag, type
dd 1 ; PhotometricInterpretation count
dd 2 ; PhotometricInterpretation value
dw 273,4 ; StripOffsets tag, type
dd 1 ; StripOffsets count
dd data ; StripOffsets value
dw 277,3 ; SamplesPerPixel tag, type
dd 1 ; SamplesPerPixel count
dw 3,0 ; SamplesPerPixel value, padding
dw 278,4 ; RowsPerStrip tag, type
dd 1 ; RowsPerStrip count
dd 10 ; RowsPerStrip value
dw 279,4 ; StripByteCounts tag, type
dd 1 ; StripByteCounts count
dd ifd-data ; StripByteCounts value
dw 282,5 ; XResolution tag, type
dd 1 ; XResolution count
dd xres ; XResolution offset
dw 283,5 ; YResolution tag, type
dd 1 ; YResolution count
dd yres ; YResolution offset
dw 296,3 ; ResolutionUnit tag, type
dd 1 ; ResolutionUnit count
dw 1,0 ; ResolutionUnit value, padding
next: dd 0 ; next IFD offset
[1] Source: page 24 of https://www.adobe.io/content/dam/udp/en/open/standards/tiff/TIFF6.pdf https://www.adobe.io/content/dam/udp/en/open/standards/tiff/...