htrdr-image.5 (4396B)
1 .\" Copyright (C) 2018-2019, 2022-2025 Centre National de la Recherche Scientifique 2 .\" Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux 3 .\" Copyright (C) 2022-2025 Institut Pierre-Simon Laplace 4 .\" Copyright (C) 2022-2025 Institut de Physique du Globe de Paris 5 .\" Copyright (C) 2018-2025 |Méso|Star> (contact@meso-star.com) 6 .\" Copyright (C) 2022-2025 Observatoire de Paris 7 .\" Copyright (C) 2022-2025 Université de Reims Champagne-Ardenne 8 .\" Copyright (C) 2022-2025 Université de Versaille Saint-Quentin 9 .\" Copyright (C) 2018-2019, 2022-2025 Université Paul Sabatier 10 .\" 11 .\" This program is free software: you can redistribute it and/or modify 12 .\" it under the terms of the GNU General Public License as published by 13 .\" the Free Software Foundation, either version 3 of the License, or 14 .\" (at your option) any later version. 15 .\" 16 .\" This program is distributed in the hope that it will be useful, 17 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of 18 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 .\" GNU General Public License for more details. 20 .\" 21 .\" You should have received a copy of the GNU General Public License 22 .\" along with this program. If not, see <http://www.gnu.org/licenses/>. 23 .Dd October 4, 2023 24 .Dt HTRDR-IMAGE 5 25 .Os 26 .Sh NAME 27 .Nm htrdr-image 28 .Nd two dimensional image format 29 .Sh DESCRIPTION 30 .Nm 31 is an image format where data is stored as plain text. 32 Text after the 33 .Li \&# 34 character is considered a comment and is therefore ignored, as are empty 35 lines. 36 The first valid line stores 2 unsigned integers representing the image 37 definition, i.e. the number of pixels per row and column. 38 Next, each line stores the 8 components of a pixel. 39 .Pp 40 Pixels are sorted line by line, with the origin defined in the top left 41 corner of the image. 42 With an image definition of N by M pixels, with N the number of pixels 43 per line and M the total number of lines in the image, the first N 44 pixels correspond to the pixels on the top line of the image, the next N 45 pixels are the pixels on the second line and so on. 46 .Pp 47 .Xr htpp 1 48 can be used to convert images in 49 .Nm 50 format into a regular PPM image. 51 Note that the nature and unit of the data stored in a 52 .Nm 53 file are not determined by the file format itself. 54 Please refer to the program that generates the image for a full 55 description of the data it contains. 56 .Pp 57 The file format is as follows: 58 .Bl -column (definition) (::=) () 59 .It Ao Va htrdr-image Ac Ta ::= Ta Ao Va definition Ac 60 .It Ta Ta Ao Va pixel Ac 61 .It Ta Ta Va ... 62 .It \ Ta Ta 63 .It Ao Va definition Ac Ta ::= Ta Ao Va width Ac Ao Va height Ac 64 .It Ao Va width Ac Ta ::= Ta Va integer 65 .It Ao Va height Ac Ta ::= Ta Va integer 66 .It Ao Va pixel Ac Ta ::= Ta 67 .Aq Va cpt 68 .Aq Va cpt 69 .Aq Va cpt 70 .Aq Va cpt 71 .Aq Va cpt 72 .Aq Va cpt 73 .Aq Va cpt 74 .Aq Va cpt 75 .It Ao Va cpt Ac Ta ::= Ta Va real 76 # Pixel component 77 .El 78 .Sh EXAMPLES 79 Image of 800 by 600 pixels. 80 The comment after each pixel is the pixel's index in the image: the 81 first and second integers are respectively the pixel's row and column 82 index in the image: 83 .Bd -literal 84 800 600 # Image definition 85 86 # Pixels of the 1st line 87 2.55e-4 2.90e-5 3.75e-4 4.48e-5 3.20e-4 3.16e-5 306.484 259.7 # (1,1) 88 2.95e-4 3.37e-5 3.39e-4 4.16e-5 3.38e-4 4.60e-5 18.3633 2.663 # (2,1) 89 3.76e-4 5.43e-5 3.13e-4 3.48e-5 3.38e-4 3.32e-5 19.6252 2.670 # (3,1) 90 ... 91 7.13e-4 1.14e-4 7.66e-4 1.35e-4 7.97e-4 1.26e-4 119.820 93.78 # (799,1) 92 6.59e-4 1.14e-4 7.47e-4 1.41e-4 4.39e-4 7.33e-5 24.8655 2.463 # (800,1) 93 94 # Pixels of the 2nd line 95 3.33e-4 6.02e-5 4.21e-4 7.66e-5 3.44e-4 3.81e-5 19.4580 2.506 # (1,2) 96 3.50e-4 4.93e-5 3.23e-4 2.52e-5 3.03e-4 2.42e-5 102.566 81.29 # (2,2) 97 2.72e-4 4.69e-5 3.41e-4 4.12e-5 2.52e-4 2.06e-5 25.5801 5.377 # (3,2) 98 ... 99 7.52e-4 1.31e-4 8.91e-4 1.84e-4 5.48e-4 1.30e-4 46.5418 12.47 # (799,2) 100 6.82e-4 1.42e-4 6.61e-4 7.85e-5 4.44e-4 5.99e-5 59.8728 32.14 # (800,2) 101 102 ... 103 104 # Pixels of the 600th line 105 2.69e-4 7.44e-5 2.31e-4 2.56e-5 1.95e-4 2.30e-5 43.8242 15.00 # (1,600) 106 4.32e-4 1.25e-4 2.22e-4 2.22e-5 2.04e-4 2.60e-5 25.5498 1.739 # (2,600) 107 2.78e-4 5.81e-5 2.75e-4 4.99e-5 2.17e-4 3.30e-5 38.4448 7.161 # (3,600) 108 ... 109 3.54e-4 4.32e-5 3.07e-4 3.80e-5 2.38e-4 2.49e-5 102.893 36.98 # (799,600) 110 3.07e-4 2.61e-5 4.60e-4 1.13e-4 2.69e-4 4.29e-5 42.75070 11.9 # (800,600) 111 .Ed 112 .Sh SEE ALSO 113 .Xr htpp 1 , 114 .Xr htrdr 1 115 .Sh HISTORY 116 The 117 .Nm 118 format was first developed for the 119 .Xr htrdr 1 120 program.