473,324 Members | 1,678 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,324 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 4101
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: 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
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
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.