Forums : Ohloh General Discussion

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.blackduck.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at info@openhub.net

Java MSN Messenger Library - problem in set picture using MSN Messenger 9.0

because I can not see the photo set on msn messenger 9.0? What's happening?

its my code:

public static MsnObject getDisplayPicture(MsnMessenger messenger) {

BufferedImage imagem = null;
try {
imagem = ImageIO.read(new File(D:/alana.jpg));
} catch (IOException ex) {
Logger.getLogger(BasicMessenger.class.getName()).log(Level.SEVERE, null, ex);
}
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
ImageIO.write(imagem, JPG, bos);
} catch (IOException ex) {
Logger.getLogger(BasicMessenger.class.getName()).log(Level.SEVERE, null, ex);
}
byte[] bImg = bos.toByteArray();

String location = null;

MsnObject obj = MsnObject.getInstance(messenger.getOwner().getEmail().getEmailAddress(), bImg);
obj.setCreator(messenger.getOwner().getEmail().getEmailAddress());
obj.setType( MsnObject.TYPEDISPLAYPICTURE );
obj.setSize( bImg.length );
obj.setLocation( location );

return obj;
}

algebra about 15 years ago