473,396 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Creating a bitmap programmatically


I want plot points on a cartesian surface with single pixels. I have been
unable to find a graphics member which draws points. (Is there one?)

I would like to create a bitmap one element wide and one element high where
the element is black and use the drawimage method. I don't want to read the
bitmap from a file. Is there a way to create this bitmap programmaticaly?

--
mark
Nov 21 '05 #1
3 1954
Hi,

Use the graphics class fillellipse method with the width and height
= 1

Ken
-------------
"mark" <ma**@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...

I want plot points on a cartesian surface with single pixels. I have been
unable to find a graphics member which draws points. (Is there one?)

I would like to create a bitmap one element wide and one element high where
the element is black and use the drawimage method. I don't want to read the
bitmap from a file. Is there a way to create this bitmap programmaticaly?

--
mark
Nov 21 '05 #2
Can you also use the Drawline with length = 1. Is so, which is faster?

"Ken Tucker [MVP]" wrote:
Hi,

Use the graphics class fillellipse method with the width and height
= 1

Ken
-------------
"mark" <ma**@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...

I want plot points on a cartesian surface with single pixels. I have been
unable to find a graphics member which draws points. (Is there one?)

I would like to create a bitmap one element wide and one element high where
the element is black and use the drawimage method. I don't want to read the
bitmap from a file. Is there a way to create this bitmap programmaticaly?

--
mark

Nov 21 '05 #3

"mark" <ma**@discussions.microsoft.com> wrote

I want plot points on a cartesian surface with single pixels. I have been
unable to find a graphics member which draws points. (Is there one?)
See Bitmap.GetPixel Bitmap.SetPixel
I would like to create a bitmap one element wide and one element high where
the element is black and use the drawimage method. I don't want to read the
bitmap from a file. Is there a way to create this bitmap programmaticaly?

Dim Pixel As Bitmap = New Bitmap(1,1)
Dim grx As Graphics = Graphics.FromImage(Pixel)
grx.Clear(Color.Black)
grx.Dispose

I am not sure what you wanted to use the DrawImage routine for....
HTH
LFS
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MiW | last post by:
Hi I'm making a kind of JavaScript-based library for creating SVG objects/elements. And I hit the wall... Every element (rect, circle etc.) can be created using *.createElement, then...
1
by: James Dean | last post by:
In my program i create a 32ARGB bitmap. To actually create the bitmap seems very slow. In fairness the file size is very big. I support multiple bitmaps as well. I have to convert these bitmaps to...
3
by: Bradford | last post by:
I have an Windows application that displays lots of different colored lines in a Panel by using the Graphics.DrawLine method. The location and length of each line comes from a database query that...
3
by: Joe Black | last post by:
Hi everyone, I have a pesky little problem that is driving me nuts. I'm trying to capture an image of a web page programmatically in a background thread or process. What I'd like to do is create...
2
by: Mad Scientist Jr | last post by:
I have a bitmap (32 pixels high, 8192 pixels wide) that contains 255 images, each 32 pixels wide, that I would like to chop up into individual 32x32 bitmap files. Rather than spending hours in...
7
by: Nathan Sokalski | last post by:
I am having a problem saving an image with the same name it originally had. I have two similar versions of my code, one in which I close the FileStream used to open the original image before saving,...
4
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. ...
7
by: Fir5tSight | last post by:
Hi All, I used the following code in C#: using System.Drawing; //blah blah blah Bitmap bmp = new Bitmap();
2
by: Peter Oliphant | last post by:
I want to create a new Bitmap which is a portion of an existing Bitmap. For example, if I have a Bitmap that is 100x100 in size I might want to create a new Bitmap that is equivalent to the one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.