Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] ico on the title bar

Hello,

I had the same problem. I was using "png" files.
Finaly I made the image transparent using a graphical program, as Paint
Shop Pro 6 and then I used it like this:

Image icon = new Image(shell.getDisplay(), "image.png");

Laurentia 




Hi Guys


I am trying to have an icon on my window title-bar with transparent
pixels.. 
My image type is ICO. First I wanna convert the image to bmp so my
first question is can I just rename the file to .bmp or do I need to
do more things.
Then I am thinking of getting the image data then call new on the
Image constructor with icondata.getTransparencyMask() parameter ?

Image icon= new Image(display, "c:\\project\\icon.bmp");
ImageData icondata= icon.getImageData();
icon= new Image(display, icondata, icondata.getTransparencyMask());
shell.setImage(icon);

thank you 

Brian
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top