|
Oh, one other question. You apparently assume that the pixels are RGB triples. You never check the bitmap info to make sure it matches. Were you told this is the structure of the image?
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
Yeah, I spotted that, too. But, I assume it is, if it were 32 bit, he'd be complaining about pixels not processed, I reckon.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I spotted the initialisation of xp and yp straight after posting. But it had no effect.
I wasn't aware you could check if it was an RGBTRIPLE. Ignorance, I guess. How would I go about this? However, the other program I am using to create the random noise input image seems to work fine with the same values in the header BITMAPINFOHEADER and BITMAPFILEHEADERs.
Oh, and, rather ironically, I used so many function calls to try and clean the for loops up.
"Sir, I protest. I am NOT a merry man!"
|
|
|
|
|
Have you tried stepping through your code in the debugger to see if things actually work like you're expecting them to? I would have been doing that about 14 messages ago.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
Hmm....
xp is set to 4294967295 and does not change with each loop... y, however, does as is wanted.
"Sir, I protest. I am NOT a merry man!"
|
|
|
|
|
Okay, fixed that. Still get the same output, though.
"Sir, I protest. I am NOT a merry man!"
|
|
|
|
|
Hmm.... I tried recreating the file using the other program(which uses the same values in bmp and bfh) using the CREATE_NEW definition in the CreateFile() function. When I do this, the resulting image cannot be drawn by windows picture and fax viewer. This may be the problem...
"Sir, I protest. I am NOT a merry man!"
|
|
|
|
|
Sounds like a clue to me. I'm not really up on that kind of file I/O. I rarely store things these days.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
You've gone quiet. Did you ever get it to work? Inquiring minds want to know.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
Unfortunately I haven't got it to work yet.
I shall keep at it, however.
"Sir, I protest. I am NOT a merry man!"
|
|
|
|
|
I am using Datagrid in my application. And at the same time i want to highlight particular row in datagrid.
Using graphics class i tried to draw a rectangle on the row but drawn rectangle is invisible.
In formload, datagrid is there. And in application depending upon the event rectangle should be drawn on the datagrid on particular row.
Please assist me in this.
|
|
|
|
|
Didn't you just ask this same question about 2 messages below using the name gayatrit, delete it, set up a new ID, and ask it again?
If you don't have the data, you're just another a**hole with an opinion.
modified on Saturday, June 7, 2008 3:10 AM
|
|
|
|
|
foreach (DataGridViewRow row in dataGridView.Rows)
{
row.DefaultCellStyle.BackColor = Color.Tomato;
}
You can add if statements within the foreach to change row colors according to conditions like so
foreach (DataGridViewRow row in dataGridView.Rows)
{
if (row.Cells[13].Value.ToString() == "someValue")
{
row.DefaultCellStyle.BackColor = Color.Tomato;
}
else if(row.Cells[13].Value.ToString() == "someOtherValue")
{
row.DefaultCellStyle.BackColor = Color.Blue;
}
}
hope it helps
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Thank u Mr.Harvey
it worked 
|
|
|
|
|
glad to have helped
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
|
You're not giving us a lot to work with in how you're doing it but sounds like it might be an order of operations issue. You draw your rectangle first and then the datagrid draws over it. That's why when you set it to invisible, it doesn't tromp all over your rectangle.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
I want to impliment radial layout tree. is it fesible on C# form?
and how?
|
|
|
|
|
Sohial A Rana wrote: I want to impliment radial layout tree. is it fesible on C# form?
Yup!
Sohial A Rana wrote: and how?
With code!
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
Hi everyone,
I dont know is this correct forum for ask this question or no?
How can I make plugin for photoshop
|
|
|
|
|
|
Thanks for your links. 
|
|
|
|
|
Hi Group,
I have a little app that loads a PNG image (128x128x32), and draws it to another canvas, with scaling. The destination size is 512x512, and, using VB.net, I use the commands (g is a graphics Canvas)
g.FillRectangle(Brushes.White, New Rectangle(0, 0, 512, 512))
g.DrawImage(Img, 0, 0, 512, 512)
However, the image drawn to the canvas is more like 560x560 pixels.
Does anyone know why this is happening? The source image is definately 128x128, and is 72dpi... although this shouldnt affect anything... should it?
Thanks,
Jason
|
|
|
|
|
How about trying DrawImageUnscaled?
|
|
|
|
|
Hi Leppie,
That wont work - I need the image scaling.
Looking around a bit, I think that GDI+ is being too clever. I noticed that the PNGs that didnt work well had a different Dots-per-inch setting to ones that did.
So, I suppose I aught to amend my question to say how do I get GDI+ to ignore these values, and simply do what I asked of it - scale a bitmap to fit a rectangle
thanks
Jason
|
|
|
|