I'm using OpenGL in Visual Basic .net 2005 and i need to use the following
function
glBitmap(width as integer,height as integer, xorig as single, yorig as
single, xmove as single, ymove as single, bitmap as System.InPtr)
or
glBitmap(width as integer,height as integer, xorig as single, yorig as
single, xmove as single, ymove as single, bitmap() as byte)
I've been looking for a way to pass an array of bytes or a pointer to an
image, in visual basic .net but i don't seem to find it.
either if i use an image
Dim imgToPtr As Image = Image.FromFile("C:\TestImage.jpg")
or a bitmap
Dim bmpTest As Bitmap = New Bitmap("C:\TestImage.jpg")
i can't find a way to convert it to a pointer or an array of bytes.
Can you help?
My thanks in advanced
Ricardo Furtado 1 2871
"Ricardo Furtado" <Ri************@discussions.microsoft.comschrieb
I'm using OpenGL in Visual Basic .net 2005 and i need to use the
following function
glBitmap(width as integer,height as integer, xorig as single, yorig
as single, xmove as single, ymove as single, bitmap as System.InPtr)
or
glBitmap(width as integer,height as integer, xorig as single, yorig
as single, xmove as single, ymove as single, bitmap() as byte)
I've been looking for a way to pass an array of bytes or a pointer
to an image, in visual basic .net but i don't seem to find it.
either if i use an image
Dim imgToPtr As Image = Image.FromFile("C:\TestImage.jpg")
or a bitmap
Dim bmpTest As Bitmap = New Bitmap("C:\TestImage.jpg")
i can't find a way to convert it to a pointer or an array of bytes.
Can you help?
Have a look at the Bitmap's LockBits function. The Scan0 property of the
returned object might be what you're looking for. I don't know if the
function expects any header.
Armin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Swarup |
last post by:
I am reading a file (txt, xml, gif, ico, bmp etc) byte by byte and filling
it into a byte arry. Now i have to convert it into a string to store it in
the database.
I use...
|
by: Sandi |
last post by:
I have a simple problem:
I have an Access database (images.mdb) that has 2 columns: one is the id if
the picture (an integer) and one (column named picture) is a field of type
OLE Object which...
|
by: Rob T |
last post by:
Hi, I'm trying to convert his line from C# to VB:
System.Drawing.Image _img=
System.Drawing.Image.FromStream(new
System.IO.MemoryStream((byte)SqlReader);
I have this so far:
dim Img as...
|
by: Ken Dopierala Jr. |
last post by:
Hi,
I'm reading the header file of a PCX image and I need to convert 2 bytes
to a short. How would I go about doing this? I know that they are bytes 8
& 9 in my byte array. I'm not sure how to...
|
by: ShihChengYu |
last post by:
Dear all:
How to convert color image to bi-level image? I have confronted one
problem when I build my OCR project. I used an software API function to
enhance my project, but the API only...
|
by: piggy |
last post by:
I am trying to convert an image to an byte array (tobytes() method) and from
byte array back to an image (frombytes() method). The problem i have here is
say the image size is 285 bytes but the...
|
by: orange123 |
last post by:
Hi
Can someone help me please?
(I am doing all this code in VB.NET)
I have been trying to convert an existing document (word, excel, pdf, powerpoint, etc) to an image field) in my sql server...
|
by: minouparhizkar |
last post by:
hi could anyone helping me to finish this i have no idea how to implement the program in java im trying to grabbing the pixel from image and then convert it to the txt file .i did that but it didnt...
|
by: Debadatta Mishra |
last post by:
Introduction
In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
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...
|
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...
| |