473,320 Members | 2,035 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,320 software developers and data experts.

Efficient way to create and access bitmap data

I am reading in a certain file format and it is compressed with Run
Length encoding. To output to the screen i convert this to a 24bpp
bitmap. The problem is when the data is decompressed its big and the
program is very slow.....any functions in C# to help with this......

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
1 2040
The only thing can be recommad to is to try using method:
Bitmap.LockBits(
Rectangle rect,
ImageLockMode flags,
PixelFormat format
);

It returns BitmapData with Scan0 property which returns
memory address of first byte of bitmap data.
....but from here becomes "UNSAFE" mode with pointers.

But, If You want to work with files and streams then
make sure to get those files specification (if they
have any compression or particular byte direction?)
Good thing is to start with small files e.g. 16x16.

Usually if there's no compression, image data lies
at the end part of file. So if you know its size then
you can easily gets its bytes.
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"James Dean" <m_*******@yahoo.com> wrote in message
news:ey**************@TK2MSFTNGP11.phx.gbl...
I am reading in a certain file format and it is compressed with Run
Length encoding. To output to the screen i convert this to a 24bpp
bitmap. The problem is when the data is decompressed its big and the
program is very slow.....any functions in C# to help with this......

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2

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

Similar topics

11
by: Prashant | last post by:
Hi, I have a huge problem. I have a data file which looks something like this -: ..1 .5 .9 -1 .2 .5 ...... ..2 .9 .1 .4 .3 -1 ...... ..2 .4 .5 .7 .6 .2 ...... ........
8
by: Jerry | last post by:
I have an off-the-shelf app that uses an Access database as its backend. One of the tables contains a field with an "OLE Object" datatype. I'm writing some reports against this database, and I...
1
by: James Dean | last post by:
I was wondering if anybody knew and easy way to read pixels. Is the easiest way to read a byte in convert it to a Bitarray and then when finished convert it back to Byte......I am looking in my...
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...
5
by: Lance | last post by:
I need to create a Drawing.Bitmap from an array of integer values. My current technique creates a bitmap that eventually becomes corrupt (i.e., the bitmap's pixels change to a different color...
5
by: Marco Castro | last post by:
Along time ago I created an access database where I used the ole field type to store images. If I look at the table data it has the work Picture in its field. The image in that field displays...
3
by: radu | last post by:
i need a bit of help with few lines of code. 1. i have integer array a = numbers from 0 to 256 2. i have to create a 256 colours bitmap of 500x500 pixels, asign colours as matrix a. ex. bitmap at...
82
by: Bill David | last post by:
SUBJECT: How to make this program more efficient? In my program, a thread will check update from server periodically and generate a stl::map for other part of this program to read data from....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.