By Rory Cellan-Jones
Technology correspondent, BBC News
Work by Sir Joshua Reynolds was among those uploaded to Wikipedia
The battle over Wikipedia's use of images from a British art gallery's website has intensified.
The online encyclopaedia has accused the National Portrait Gallery (NPG) of betraying its public service mission.
But the gallery has said it needs to recoup the £1m cost of its digitisation programme and claims Wikipedia has misrepresented its position.
The NPG is threatening legal action after 3,300 images from its website were uploaded to Wikipedia.
The high-resolution images were uploaded by Wikipedia volunteer Derrick Coetzee.
Now Erik Moeller, the deputy director of the Wikimedia Foundation which runs the online encyclopaedia, has laid out the organisation's stance in a blog post.
He said most observers would think the two sides should be "allies not adversaries" and that museums and other cultural institutions should not pursue extra revenue at the expense of limiting public access to their material.
"It is hard to see a plausible argument that excluding public domain content from a free, non-profit encyclopaedia serves any public interest whatsoever," he wrote.
He points out that two German photographic archives donated 350,000 copyrighted images for use on Wikipedia, and other institutions in the United States and the UK have seen benefits in making material available for use.
Another Wikipedia volunteer David Gerard has blogged about the row, claiming that the National Portrait Gallery makes only £10-15,000 a year from web licensing, less than it makes "selling food in the cafe".
But the gallery insists that its case has been misrepresented, and has now released a statement denying many of the charges made by Wikipedia.
It denies claims that it has been "locking up and limiting access to educational materials", saying that it has been a pioneer in making its material available.
It has worked for the last five years toward the target of getting half of its collection online by 2009. "We will be able to achieve this," said the gallery's statement, "as a result of self-generated income."
The gallery says that while it only makes a limited revenue from web licensing, it earns far more from the reproduction of its images in books and magazines - £339,000 in the last year.
But it says the present situation jeopardises its ability to fund its digitisation process from its own resources.
The gallery has claimed that Derrick Coetzee's actions have breached English copyright laws, which protect copies of original works even when they themselves are out of copyright.
The National Portrait Gallery now says it only sent a legal letter to Derrick Coetzee after the Wikimedia Foundation failed to respond to requests to discuss the issue. But it says contact has now been made and remains hopeful that a dialogue will be possible.
A spokeswoman also said that the two German archives mentioned in Erik Moeller's blog had in fact supplied medium resolution images to Wikipedia, and insisted that the National Portrait Gallery had been willing to offer similar material to Wikipedia.
The gallery said the row could prevent it putting more of its collection online
The gallery also explained how Derrick Coetzee was able to obtain the high resolution files from its site. They were made available to visitors using a "Zoomify" feature, which works by allowing several high resolution files to be seen all together.
It claims Mr Coetzee used special software to "de-scramble" the high-resolution tiles, allowing the whole portrait to be seen in high resolution.
The British Association of Picture Libraries and Agencies has backed the National Portrait Gallery's stance.
"If owners of out of copyright material are not going to have the derivative works they have created protected, which will result in anyone being able to use then for free, they will cease to invest in the digitisation of works, and everyone will be the poorer," it wrote in an email to its members.
But the Wikipedia volunteer David Gerard accuses the gallery of bureaucratic empire building.
"They honestly think the paintings belong to them rather than to us," he wrote.