Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
QuestionFinger print Pin
Abdul Rahman Hamidy7-Jan-09 21:04
Abdul Rahman Hamidy7-Jan-09 21:04 
AnswerRe: Finger print Pin
Ashfield7-Jan-09 21:10
Ashfield7-Jan-09 21:10 
GeneralRe: Finger print Pin
Abdul Rahman Hamidy7-Jan-09 21:21
Abdul Rahman Hamidy7-Jan-09 21:21 
GeneralRe: Finger print Pin
Eddy Vluggen8-Jan-09 0:53
professionalEddy Vluggen8-Jan-09 0:53 
GeneralRe: Finger print Pin
Ashfield8-Jan-09 1:25
Ashfield8-Jan-09 1:25 
GeneralRe: Finger print Pin
Dragonfly_Lee8-Jan-09 19:55
Dragonfly_Lee8-Jan-09 19:55 
QuestionHow can I make an Image tranparent Pin
Naveed7277-Jan-09 20:38
Naveed7277-Jan-09 20:38 
AnswerRe: How can I make an Image tranparent Pin
Lev Danielyan7-Jan-09 23:13
Lev Danielyan7-Jan-09 23:13 
First create a buffer image of the same size and resolution as the source image. Then draw the source image on the buffer, specifying the transparent color using the ImageAttributes.
Something like this:

Image image = Image.FromFile(@"c:\logo.png");
Bitmap buffer = new Bitmap(image.Width, image.Height);
buffer.SetResolution(image.HorizontalResolution,image.VerticalResolution);

Rectangle destRect = new Rectangle(0, 0, image.Width, image.Height);

ImageAttributes attributes = new ImageAttributes();

// Set the transparent color 
attributes.SetColorKey(Color.Red, Color.Red);

using (Graphics gr = Graphics.FromImage(buffer)) {
    gr.DrawImage(image, destRect, 0, 0, image.Width,
                image.Height, GraphicsUnit.Pixel, attributes);
}

buffer.Save(@"c:\logo2.png");


Regards,
Lev

GeneralRe: How can I make an Image tranparent Pin
Naveed7277-Jan-09 23:59
Naveed7277-Jan-09 23:59 
GeneralRe: How can I make an Image tranparent Pin
Lev Danielyan8-Jan-09 0:09
Lev Danielyan8-Jan-09 0:09 
GeneralRe: How can I make an Image tranparent Pin
Naveed7278-Jan-09 0:25
Naveed7278-Jan-09 0:25 
GeneralRe: How can I make an Image tranparent Pin
Lev Danielyan8-Jan-09 0:49
Lev Danielyan8-Jan-09 0:49 
GeneralRe: How can I make an Image tranparent Pin
Naveed7278-Jan-09 1:10
Naveed7278-Jan-09 1:10 
GeneralRe: How can I make an Image tranparent Pin
Lev Danielyan8-Jan-09 1:12
Lev Danielyan8-Jan-09 1:12 
GeneralRe: How can I make an Image tranparent Pin
Luc Pattyn8-Jan-09 3:22
sitebuilderLuc Pattyn8-Jan-09 3:22 
GeneralRe: How can I make an Image tranparent Pin
Lev Danielyan8-Jan-09 5:42
Lev Danielyan8-Jan-09 5:42 
QuestionAccess Modifier, protect child classes constructor Pin
DaveyM697-Jan-09 12:48
professionalDaveyM697-Jan-09 12:48 
AnswerRe: Access Modifier, protect child classes constructor Pin
Colin Angus Mackay7-Jan-09 13:01
Colin Angus Mackay7-Jan-09 13:01 
GeneralRe: Access Modifier, protect child classes constructor Pin
DaveyM697-Jan-09 13:21
professionalDaveyM697-Jan-09 13:21 
GeneralRe: Access Modifier, protect child classes constructor Pin
Colin Angus Mackay7-Jan-09 13:42
Colin Angus Mackay7-Jan-09 13:42 
GeneralRe: Access Modifier, protect child classes constructor Pin
DaveyM697-Jan-09 13:48
professionalDaveyM697-Jan-09 13:48 
GeneralRe: Access Modifier, protect child classes constructor Pin
Luc Pattyn7-Jan-09 14:38
sitebuilderLuc Pattyn7-Jan-09 14:38 
GeneralRe: Access Modifier, protect child classes constructor [modified] Pin
Dragonfly_Lee7-Jan-09 18:11
Dragonfly_Lee7-Jan-09 18:11 
GeneralRe: Access Modifier, protect child classes constructor Pin
Luc Pattyn7-Jan-09 18:15
sitebuilderLuc Pattyn7-Jan-09 18:15 
GeneralRe: Access Modifier, protect child classes constructor Pin
N a v a n e e t h7-Jan-09 18:17
N a v a n e e t h7-Jan-09 18:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.