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

About unsafe Image processing

Hi.

I use System.Drawing.Bitmap to work with bitmaps.
I use LockBits to retrieve a BitmapData which in turn provides me with the
Scan0 property which i then use to loop the pixel data using byte *.
I am aware of that internally GDI+ stores RGB as BGR,
therefore i have to to a manual swap for the R and B components of each
pixel.
This works when the image contains no alpha channel,
but when an alpha channel is present (Format32bppArgb)
i wonder where in that four element array that alpha is stored?
I cant get it right.

One more thing;
I am not actually manipulating the pixels, what i really want to do is to
copy
the pixel data into a byte array containing the scan lines queued after each
other
in R,G,B format.
But since GDI+ internally stores the components in BGR order, there is'nt a
way to copy the entire pixel data
directly without looping the pixels, is'nt it?

Thank you!
MVH Dennis
Nov 16 '05 #1
0 1068

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

Similar topics

17
by: Rich S. | last post by:
Hello Just like everyone else, I am excited about how easily one can create Windows applications with the .NET platform, but for shareware, I have some serious reservations 1. Your code can be...
8
by: | last post by:
Wel, I am rebuilding the VC# 2002 project that I have deployment problems with the 2003 version, hoping this solves the problems, but now I encounter this wierd bug??? If I have the project, and...
6
by: Daniel O'Connell | last post by:
Two questions here: 1. Is there any particular reason why when using stackalloc, the code byte *buffer = stackalloc byte; works, but code like byte *buffer; buffer = stackalloc byte; is...
0
by: AnthonyBenbrook | last post by:
Hello I'm writing some code to perform image manipulation via GDI+. In order to do this efficiently, I've set up the normal flow for accessing pixel data in a Bitmap object: BitmapData data...
11
by: Lloyd Dupont | last post by:
(not I use 2.0, so new return a "normal" pointer and gcnew return a managed one, my question below regarding new concern plain standart C++ allocator) - if I use the default new operator, are all...
10
by: Enrique Cruiz | last post by:
Hello all, I am currently implementing a fairly simple algorithm. It scans a grayscale image, and computes a pixel's new value as a function of its original value. Two passes are made, first...
3
by: birensubudhi | last post by:
hey guys,can anyone tell me what is image processing, how to do it using C. IN KSHITIJ 2007 held at IIT kgp a que by INFOSYS is asked, they hav given an image then cut in different orientation...
0
by: tavares | last post by:
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) ...
0
by: mustran | last post by:
Hello, I am trying to process an image captured from a frame grabber card without converting any image format (like jpg or bmp cuz it wastes lots of times about 50ms) For video applications...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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...

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.