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

Slow SetPixel performance

Hi, I found the SetPixel performance is very poor. it took lots of time to
twist dots for a large image. I wonder if there is any other way to speed
it up. Thanks.

Peter

http://www.infopx.com
Nov 16 '05 #1
1 4111
It's slow because the entire bitmap is locked, the pixel is updated and then
the bitmap is released again. Repeating this process a couple of times makes
it real slow. Using unsafe code you could lock the bitmap once do all your
pixel operations and release it afterwards. You should read the following
column by Eric Gunnerson :
http://msdn.microsoft.com/library/de...rp11152001.asp

HTH

Yves

"Peter" <yu******@hotmail.com> schreef in bericht
news:Oz**************@tk2msftngp13.phx.gbl...
Hi, I found the SetPixel performance is very poor. it took lots of time to twist dots for a large image. I wonder if there is any other way to speed
it up. Thanks.

Peter

http://www.infopx.com

Nov 16 '05 #2

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

Similar topics

2
by: timeash | last post by:
The code below subtracts two images from one another and determines if there is any new things in the picture. A large enough color change will "register" a pixel. The pixel is then plotted using...
9
by: Neil | last post by:
I've been discussing here a SQL 7 view which scrolls slowly when linked to an Access 2000 MDB. After trying various things, I've distilled it down to the following: when the linked view has a...
1
by: Peter | last post by:
Hi, I found the SetPixel performance is very poor. it took lots of time to twist dots for a large image. I wonder if there is any other way to speed it up. Thanks. Peter ...
3
by: halise | last post by:
Hi, i am in trouble with an exception in .net platform with c#. The exception thrown is exactly as follows: System.ArgumentException: Invalid parameter used. at...
3
by: jdipalmajr | last post by:
I am using a strongly typed dataset with a design time schema. I load data into the dataset tables from xml. The problem I am having is after the XML load. The first time I Add a row to a table...
0
by: mark | last post by:
Somebody can explain me why if I put a color with SetPixel the color showed is of another value? For example: I've to draw a grayscale image. The color RGB(90,90,90) become RGB(40,45,60). In the...
0
by: Celarian | last post by:
I've written a function, Despeckle, to remove noise from Bitmaps. The English description of the algorithm I've implemented might read as follows: For each pixel in the image, create an array...
5
by: xhy_China | last post by:
I wrote a program to convert a bitmap to gray(in c#) . But why it runs so slow?? More slower than I wrote in Delphi?? They have the same algorithm. Bitmap openBitmap = new...
1
by: tamasumalta | last post by:
I would like to change some pixels inside a particular gif file. I tried using the setpixel and noticed that it is not compatible with indexed images. Then I converted the file from a gif to a bmp...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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:
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,...

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.