473,395 Members | 1,466 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,395 software developers and data experts.

How to create Raw Image Data

Hi,

I need to open an image and pass it to another unit as a Raw Image Data
(etc. it is an array of bytes with length equals
ImageWidth*ImagehHeigth*3 for 24bit per pixel format, image looks
RGBRGBRGB...RGB).

How to make it fast?

Thanks in advise,
Eugene.

Jan 18 '07 #1
4 3768
Hi,

1. Read an image as Bitmap.
2. Call the Bitmap.LockBits(...) method.
3. Check the Bitmap.PixelFormat
4. Read the Bitmap.Scan0 unsafe or safe by MarshalCopy(...)

Read the .NET docs or MSDN for more details.

HTH
Marcin

Ananas napisał(a):
Hi,

I need to open an image and pass it to another unit as a Raw Image Data
(etc. it is an array of bytes with length equals
ImageWidth*ImagehHeigth*3 for 24bit per pixel format, image looks
RGBRGBRGB...RGB).

How to make it fast?

Thanks in advise,
Eugene.
Jan 18 '07 #2
3. Check the Bitmap.PixelFormat

What for to check this?
Read the .NET docs or MSDN for more details.
I did read it, but some things get with experience.

Thank you sir.

Jan 18 '07 #3
Hi,

Ananas napisał(a):
>3. Check the Bitmap.PixelFormat

What for to check this?
To make sure if you're working with 24bit bitmaps.
>Read the .NET docs or MSDN for more details.

I did read it, but some things get with experience.

Thank you sir.
Cheers!
Marcin
Jan 18 '07 #4
Thank you for your answer.

I could get the raw image data. I tried to open 48 bit RGB image and
transform it to 24 bit RGB image by using LockBits with Format24bppRgb.
And it works!

Best regards,
Eugene.

Jan 19 '07 #5

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

Similar topics

2
by: StinkFinger | last post by:
All, Does anyone know of a script that already exists that would allow me to pass in the name of a JPG or GIF and spit out a PDF ? Just checking around before I buckle down and write one....
2
by: xj92wang | last post by:
I have following code to convert a big image to smaller thumbnail, it work's fine until one day this image come out http://www.here4now.com/mobdata/sunbleached/Untitled-2.gif The original size...
0
by: Balu Ramachandran | last post by:
How can I create the Thumbnail view from the form? In the following approach I tried but Iams facing some limitations to get the thumbnail image of the form alone. Plaese any one can help in...
6
by: windandwaves | last post by:
Hi Folk Some of my clients asked me to create "fancy emails" for them (aka html formatted emails). I know how to make a nice html document, but I had trouble creating a simple way to provide...
4
by: John Daly | last post by:
Does anyone know how to create an image (JPEG) from an HTTPResponse object? I am working on system that has a map pop up from our GIS department. I want create an image at runtime from this popup...
3
by: shapper | last post by:
Hello, I need to add a XML file from an Access database. Could someone tell me what would be the best approach? Thanks, Miguel
2
by: thisis | last post by:
Hi All, What options/methos/properties/functions/objects do I have in order to create a Function in ASP/VBScript that process/create binary data as an image file type? The Function is...
3
by: pedrito | last post by:
I've got an app that downloads images off the internet using anywhere from 1-20 threads concurrently (though generally around 4 threads). I have a preview page that shows the images as they're...
1
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button...
0
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.