Click here to Skip to main content
15,940,173 members
Home / Discussions / Graphics
   

Graphics

 
Questionchange color in image Pin
Member 343561416-Jun-08 23:58
Member 343561416-Jun-08 23:58 
AnswerRe: change color in image Pin
Christian Graus17-Jun-08 4:58
protectorChristian Graus17-Jun-08 4:58 
AnswerRe: change color in image Pin
Tim Craig17-Jun-08 18:22
Tim Craig17-Jun-08 18:22 
QuestionHow to get the Codec Name of the Video using directshow Pin
Kuldeep Bhatnagar13-Jun-08 1:23
Kuldeep Bhatnagar13-Jun-08 1:23 
QuestionBitmap.FromFile(filepath) - exception Out of memory Pin
Krishnraj11-Jun-08 23:43
Krishnraj11-Jun-08 23:43 
AnswerNET Framework Bitmap Pin
Baltoro12-Jun-08 5:39
Baltoro12-Jun-08 5:39 
Question[Solved] Cropping empty space around drawing [modified] Pin
kensai11-Jun-08 0:32
kensai11-Jun-08 0:32 
AnswerRe: [Solved] Cropping empty space around drawing Pin
kensai11-Jun-08 2:27
kensai11-Jun-08 2:27 
Problem solved here's the code:

Bitmap b = new Bitmap(filename);
Rectangle r = new Rectangle();
int topLeft = b.Width, topRight = 0, topUpper = b.Height, topBottom = 0;
string whitePixel = "ffffffff";

for (int y = 1; y < b.Height; y++)
{
    for (int x = 1; x < b.Width; x++)
    {
        if (b.GetPixel(x, y).Name != whitePixel)
        {
if (x < topLeft)
    topLeft = x;

if (x > topRight)
    topRight = x;

if (y < topUpper)
    topUpper = y;

if (y > topBottom)
    topBottom = y;
        }
    }
}

r.Location = new Point(topLeft-1, topUpper-1);
r.Size = new Size((topRight - topLeft)+1, (topBottom - topUpper)+1);
Bitmap b2 = b.Clone(r, b.PixelFormat);
b2.Save(newfilename, ImageFormat.Gif);

QuestionHow to set filter property through code without popping up property page Pin
Aamol M10-Jun-08 3:47
Aamol M10-Jun-08 3:47 
QuestionBitmap blur problem [modified] Pin
Naturality7-Jun-08 14:49
Naturality7-Jun-08 14:49 
AnswerRe: Bitmap blur problem Pin
Christian Graus7-Jun-08 16:11
protectorChristian Graus7-Jun-08 16:11 
AnswerRe: Bitmap blur problem Pin
Tim Craig7-Jun-08 19:46
Tim Craig7-Jun-08 19:46 
GeneralRe: Bitmap blur problem [modified] Pin
Naturality8-Jun-08 2:29
Naturality8-Jun-08 2:29 
GeneralRe: Bitmap blur problem Pin
Tim Craig8-Jun-08 7:56
Tim Craig8-Jun-08 7:56 
GeneralRe: Bitmap blur problem Pin
Naturality8-Jun-08 11:11
Naturality8-Jun-08 11:11 
GeneralRe: Bitmap blur problem Pin
Tim Craig8-Jun-08 11:25
Tim Craig8-Jun-08 11:25 
GeneralRe: Bitmap blur problem Pin
Naturality8-Jun-08 13:11
Naturality8-Jun-08 13:11 
GeneralRe: Bitmap blur problem Pin
Tim Craig8-Jun-08 18:58
Tim Craig8-Jun-08 18:58 
GeneralRe: Bitmap blur problem [modified] Pin
Naturality9-Jun-08 4:44
Naturality9-Jun-08 4:44 
GeneralRe: Bitmap blur problem Pin
Tim Craig9-Jun-08 9:05
Tim Craig9-Jun-08 9:05 
GeneralRe: Bitmap blur problem Pin
Naturality9-Jun-08 9:11
Naturality9-Jun-08 9:11 
GeneralRe: Bitmap blur problem Pin
Naturality9-Jun-08 10:06
Naturality9-Jun-08 10:06 
GeneralRe: Bitmap blur problem Pin
Tim Craig9-Jun-08 14:32
Tim Craig9-Jun-08 14:32 
GeneralRe: Bitmap blur problem Pin
Tim Craig9-Jun-08 15:10
Tim Craig9-Jun-08 15:10 
GeneralRe: Bitmap blur problem Pin
Naturality9-Jun-08 15:43
Naturality9-Jun-08 15:43 

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.