RosettaCodeData/Task/Grayscale-image/Ada/grayscale-image-3.ada

11 lines
308 B
Ada
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
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;