Develop a structure for storing (including swapping), modifying and retrieving raster data.
Can you describe it in detail?
It actually depends on what kind of resolution you want I guess. A raster grid means a 2 dimensional array. Therefore, you want to store following information: R, G, B, A, X, Y
X,Y is actually not mandatory as a simple map function could be used for mapping the index to X,Y. RGB : 0-255 (integer) A: 0-1(float)
Upon a little bit of research I came across this. In short we need a data structure which can be used to store raster/vector data of multiple color models, also since QGraphicsView supports a limited number of color models, we also need to derive our own widget for viewing the data we are going to store. Reference on how to get started on this can be taken from here
By structure, do you mean an API?
Nope a data structure to hold the stuff that I mentioned, on which operations can be applied in a non destructive way (partly at least, you can't avoid some loss due to the conversion of color models) and can be viewed properly.
Do you intend on saving the data based on the nature of data? For example, if the data is changing per cell, you use cell by cell, if its same over a range of cell, using run-length, etc.