-- -- RGB images with dynamically allocated raster -- with Video.Images.Raster.Generic_Unbounded; generic type Pixel_Type is private; type Array_Type is array (Integer range <>, Integer range <>) of Pixel_Type; with function To_Color (Pixel : Pixel_Type) return Color is <>; with package Raster_Images is new Generic_Raster_Images ( Pixel_Type => Pixel_Type, Array_Type => Array_Type, Parent => RGB_Raster_Image); package Video.Images.Raster.RGB.Generic_Unbounded is type Raster_Image_Base is abstract tagged null record; function Map_Color (Map : Raster_Image_Base; Pixel : Pixel_Type) return Color is (To_Color (Pixel)) with Inline; package Base is new Raster.Generic_Unbounded ( Raster_Images => Raster_Images, Parent => Raster_Image_Base); -- Generic instantiation type Image is new Base.Image with null record; -- Actual Unbounded RGB Image end Video.Images.Raster.RGB.Generic_Unbounded;