Fry the red peppers in flakes in oil until they darken slightly. Add chopped onion. Fry until soft.
Peel the ginger and grate it directly into the onion. Continue frying for a couple more minutes until everything softens.
Add mango and canned pineapple (with juice). Also add brown sugar, vinegar and garam masala. Stir the mixture well, and bring to a boil.
The mixture should simmer for about an hour. Stir occasionally. The liquid will gradually go away and there will be a jam consistency. If using raisins, add them at the end of the cooking time (about 45 minutes). Serve hot or cold.