What are the flags on this 1673 painting?

Hi, so recently I bought a puzzle of the "Het Ij voor Amsterdam, van de Mosselsteiger gezien" painting by Ludolf Bakhuzein, painted back in 1673, and I've been wondering what the blue, pink and white flag stood for, obviously it didn't hold the same meaning as current back then lolz. I'm also interested in the other flag that seems similar to the current one of the Netherlands, did it represent a region or was it an older version of the national one?

(pictures present the reference print that came with the puzzle, sorry for the flash though ;3)