fast way of pixl drawing
fast way of pixl drawing
fast way of pixl drawing
fast way of pixl drawing
fast way of pixl drawing
fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing
fast way of pixl drawing fast way of pixl drawing
fast way of pixl drawing
Go Back  Xtreme Visual Basic Talk > > > fast way of pixl drawing


Reply
 
Thread Tools Display Modes
  #1  
Old 12-13-2010, 09:06 PM
chandrakari chandrakari is offline
Newcomer
 
Join Date: Jun 2009
Location: Hyderabad, India
Posts: 9
Default fast way of pixl drawing


after decompressing the packet, received from ethernet/serial port i am getting a 128*128 pixel value set, to darwn this i had taken a picture box and made the mode to pixel and using the following code
for i=1 to 128
for j=1 to 128
picturebox.pset(i,j)
next j
next i

it is working fine but taking lot of time. if the data rate menas packet receiving rate increases, my program is becomming slow. is there any better way. if i want to scaling to 256*256 or somting else then is it possible? (fast execution method)

thank you
Reply With Quote
  #2  
Old 12-14-2010, 01:46 AM
Flyguy's Avatar
Flyguyfast way of pixl drawing Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,160
Default

Reply With Quote
  #3  
Old 12-23-2010, 06:36 PM
surfR2911 surfR2911 is offline
Contributor
 
Join Date: Oct 2009
Posts: 719
Default Stretching/scaling image in addition to drawing pixels fast..

Quote:
i want to scaling to 256*256 or somting else then is it possible?
Although the link that Flyguy provided is the definitely represents "fast way of pixl drawing", it is perhaps not the easiest way. And since you are also scaling (resizing) the graphic, making the image larger will also make it slightly blocky without using additional anti-aliasing code.

BillSoo's code was recycled into a nice DMA-oriented class (that doesn't require a dll) by noi_max in the "BillsClass.zip" attachment to this post of his pixel plotting thread:
pixel plotting example question

The class should help you modify your pset code to use the CopyMemory API instead.
If you have trouble understanding the code you should go through the pixel plotting tutorial linked to in the first post of that thread.

Once you get the graphic into a device context (using the hDC of a picturebox or a form), you can use the Stretchblt API (calling the SetStretchbltMode API beforehand with a parameter of "4" for halftoning) to get a little "free" (no extra coding) anti-aliasing which may improve the quality of the resized picture.

For an working sample of using the Stretchblt and SetStretchbltMode APIs you can see the attachment to this post:
http://www.xtremevbtalk.com/880925-post5.html

Last edited by surfR2911; 12-23-2010 at 07:33 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
fast way of pixl drawing
fast way of pixl drawing
fast way of pixl drawing fast way of pixl drawing
fast way of pixl drawing
fast way of pixl drawing
fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing fast way of pixl drawing
fast way of pixl drawing
fast way of pixl drawing
 
fast way of pixl drawing
fast way of pixl drawing
 
-->