RosettaCodeData/Task/Grayscale-image/Ada/grayscale-image-3.ada
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

10 lines
308 B
Ada

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;