The War of Independence/Peninsular War did mark a paradigm shift between Spain as "western" (Spaniards as pale, stern, haughty, cruel men in dark clothes and starched ruffs; hidalgos, inquisitors and grandees) to Spain as "eastern" (Spaniards as swarthy, passionate, anarchic, hot-blooded men in colourful, exotic clothes; bandoleros, bullfighters and gypsies).
The reasons would deserve an in-depth explanation but it would take too long, it was a mixture of events, the particular circumstances of the War (which happened mostly in the southern regions), the fall of grace of Spain, propaganda, etc.
However, Franco (the "great patriot"), in the 60's, instead of going back to a more aristocratic and lordly vision of Spain, he used, abused, mixed, added flavor and exaggerated all he could the exotic stereotype to attract tourism, he even put gypsy "cantaors" (singers) at the forefront of the Spanish cultural exports and tourism ads, this was to create a friendly, different, dummy, exotic environment that would attract a particular kind of tourist: the middle/high-class Northern European, who bored of his lavish life would seek new (but safe) worlds to explore and spend a lot of money in the process.
This has hurt Spain to extents that are difficult to even imagine, but put short: the stereotype is so far from reality that there is even a disconnection between the Spanish people and the very concept of Spain or Spaniards, to the point that I would argue that this is one of the major contributors to the anti-patriotic sentiments in this country and the independentist movements we have today in every corner of the nation.