Click here to Skip to main content
16,008,010 members
Home / Discussions / Graphics
   

Graphics

 
AnswerRe: cmbine parts of the images to complete the picture Pin
El Corazon13-Aug-07 14:20
El Corazon13-Aug-07 14:20 
Questioncurious... for the professional graphics folks here. Pin
El Corazon9-Aug-07 11:26
El Corazon9-Aug-07 11:26 
AnswerRe: curious... for the professional graphics folks here. Pin
Tim Craig11-Aug-07 18:42
Tim Craig11-Aug-07 18:42 
Questionfilling Arbitrary Area..usin MFC Pin
himuskanhere8-Aug-07 23:10
himuskanhere8-Aug-07 23:10 
AnswerRe: filling Arbitrary Area..usin MFC Pin
Luc Pattyn9-Aug-07 2:07
sitebuilderLuc Pattyn9-Aug-07 2:07 
QuestionHow to make an image (bmp) transparent? Pin
bholoo8-Aug-07 5:32
bholoo8-Aug-07 5:32 
AnswerRe: How to make an image (bmp) transparent? Pin
Mark Salsbery8-Aug-07 6:41
Mark Salsbery8-Aug-07 6:41 
AnswerRe: How to make an image (bmp) transparent? Pin
Richard Blythe8-Aug-07 17:10
Richard Blythe8-Aug-07 17:10 
The GDI+ code that will make the image semi-transparent is to create a custom color matrix. This topic is too lengthy to get into specifics but here is some sample code the will get you started:

//Define a color matrix that has 60% transparency
//The value 0.6 in row 4, column 4 specifies the alpha
float[][] matrixItems = { new float[] {1,0,0,0,0},
new float[] {0,1,0,0,0},
new float[] {0,0,1,0,0},
new float[] {0,0,0,0.6f,0},
new float[] {0,0,0,0,1}};

ColorMatrix colorMatrix = new ColorMatrix(matrixItems);
//Now we need an ImageAttributes object
ImageAtttributes imageAtt = new ImageAttributes();
imageAtt.SetColorMatrix(colorMatrix,
ColorMatrixFlag.Default, COlorAdjustType.Bitmap);

//Here, we will now draw the image using the imageAtt
//You will need to have a graphics object created. I am
//using a graphics object with a var name of "g"

g.DrawImage(
myAlphaBitmap, //the image to be made semi-transparent
new Rectangle(10,10,10,10), //destination bmp size
0.0f, //start drawing from the XPos
0.0f, //start drawing from the YPos
myAlphaBitmap.Width, //draw all of the original width
myAlphaBitmap.Height, //draw all of the original height
GraphicsUnit.Pixel, //specify the graphics unit
imageAtt); //use our custom imageAtt

//release system resources
imageAtt.Dispose();

//End of code----------------------------


Hopefully this will get you started in the right direction!

Cheers!
Richard


may your code be error free
QuestionHow to calculate the number of lines in .Png file Pin
zxc897-Aug-07 20:06
zxc897-Aug-07 20:06 
AnswerRe: How to calculate the number of lines in .Png file Pin
Christian Graus7-Aug-07 20:14
protectorChristian Graus7-Aug-07 20:14 
AnswerRe: How to calculate the number of lines in .Png file Pin
Luc Pattyn8-Aug-07 0:19
sitebuilderLuc Pattyn8-Aug-07 0:19 
Questionconverting .mb to .obj Pin
valli_guru7-Aug-07 6:01
valli_guru7-Aug-07 6:01 
AnswerRe: converting .mb to .obj Pin
Christian Graus7-Aug-07 20:10
protectorChristian Graus7-Aug-07 20:10 
GeneralRe: converting .mb to .obj Pin
valli_guru8-Aug-07 7:02
valli_guru8-Aug-07 7:02 
GeneralRe: converting .mb to .obj Pin
Tim Craig11-Aug-07 18:27
Tim Craig11-Aug-07 18:27 
QuestionCursor not shown in textBox Pin
fakhirov6-Aug-07 23:24
fakhirov6-Aug-07 23:24 
AnswerRe: Cursor not shown in textBox Pin
Mark Salsbery7-Aug-07 5:41
Mark Salsbery7-Aug-07 5:41 
QuestionHorizontal Expanding Docking Panel (web) Pin
devil854-Aug-07 8:01
devil854-Aug-07 8:01 
QuestionHOW TO place a logo watermark on live video? Pin
jondiego3-Aug-07 16:21
jondiego3-Aug-07 16:21 
AnswerRe: HOW TO place a logo watermark on live video? Pin
Drew Stainton13-Aug-07 13:49
Drew Stainton13-Aug-07 13:49 
GeneralRe: HOW TO place a logo watermark on live video? Pin
jondiego13-Aug-07 14:02
jondiego13-Aug-07 14:02 
GeneralRe: HOW TO place a logo watermark on live video? Pin
Mark Salsbery13-Aug-07 14:38
Mark Salsbery13-Aug-07 14:38 
GeneralRe: HOW TO place a logo watermark on live video? Pin
Drew Stainton13-Aug-07 16:30
Drew Stainton13-Aug-07 16:30 
GeneralRe: HOW TO place a logo watermark on live video? Pin
Drew Stainton13-Aug-07 16:32
Drew Stainton13-Aug-07 16:32 
Questionapplying texture to bitmap [modified] Pin
Force Code3-Aug-07 9:09
Force Code3-Aug-07 9:09 

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.