mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
store Avatar images as PNG format, to not lose the transparent of the pictures
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1609 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5bcaa270ca
commit
758ba49ff1
4 changed files with 17 additions and 20 deletions
|
@ -559,8 +559,8 @@ void MessengerWindow::updateAvatar()
|
|||
|
||||
// set the image
|
||||
QPixmap pix ;
|
||||
pix.loadFromData(data,size,"JPG") ;
|
||||
ui.avatarButton->setIcon(pix); // writes image into ba in JPG format
|
||||
pix.loadFromData(data,size,"PNG") ;
|
||||
ui.avatarButton->setIcon(pix); // writes image into ba in PNG format
|
||||
|
||||
delete[] data ;
|
||||
}
|
||||
|
@ -578,7 +578,7 @@ void MessengerWindow::getAvatar()
|
|||
QByteArray ba;
|
||||
QBuffer buffer(&ba);
|
||||
buffer.open(QIODevice::WriteOnly);
|
||||
picture.save(&buffer, "JPG"); // writes image into ba in JPG format
|
||||
picture.save(&buffer, "PNG"); // writes image into ba in PNG format
|
||||
|
||||
std::cerr << "Image size = " << ba.size() << std::endl ;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue