Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1 +0,0 @@
|
|||
type Grayscale_Image is array (Positive range <>, Positive range <>) of Luminance;
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
function Grayscale (Picture : Image) return Grayscale_Image is
|
||||
type Extended_Luminance is range 0..10_000_000;
|
||||
Result : Grayscale_Image (Picture'Range (1), Picture'Range (2));
|
||||
Color : Pixel;
|
||||
begin
|
||||
for I in Picture'Range (1) loop
|
||||
for J in Picture'Range (2) loop
|
||||
Color := Picture (I, J);
|
||||
Result (I, J) :=
|
||||
Luminance
|
||||
( ( 2_126 * Extended_Luminance (Color.R)
|
||||
+ 7_152 * Extended_Luminance (Color.G)
|
||||
+ 722 * Extended_Luminance (Color.B)
|
||||
)
|
||||
/ 10_000
|
||||
);
|
||||
end loop;
|
||||
end loop;
|
||||
return Result;
|
||||
end Grayscale;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
function Color (Picture : Grayscale_Image) return Image is
|
||||
Result : Image (Picture'Range (1), Picture'Range (2));
|
||||
begin
|
||||
for I in Picture'Range (1) loop
|
||||
for J in Picture'Range (2) loop
|
||||
Result (I, J) := (others => Picture (I, J));
|
||||
end loop;
|
||||
end loop;
|
||||
return Result;
|
||||
end Color;
|
||||
Loading…
Add table
Add a link
Reference in a new issue