8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
Go Back  Xtreme Visual Basic Talk > > > 8-bit Bitmaps: How to tweak the Color Table


Reply
 
Thread Tools Display Modes
  #21  
Old 02-27-2017, 09:46 AM
Cerian Knight's Avatar
Cerian Knight8-bit Bitmaps: How to tweak the Color Table Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,185
Default


Just to tidy-up my thoughts:
Quote:
Originally Posted by Mathimagics View Post
I have Autoredraw = 0, and issue a PB.Refresh whenever I change the image.
Instead of this:
Code:
PB.Picture = SourceBMP
PB.Refresh '(Me.)Refresh is faster
You could try this instead:
Code:
'Full-Screen:
'No PB.Picture = SourceBMP
PB.PaintPicture SourceBMP, 0, 0, , , , , , , vbSrcCopy 'Supplying additional parameters to create a region might be much slower!
'No PB or Me .Refresh required!
Here are the full-screen Black/White fill results (1280x1024x32-bit, this time, with a Frame control overlay present):
PB.Refresh: ~1000 fills/s (~800 w/Desktop Composition disabled. Cannot disable on Win 10)
Form Refresh: ~1500 fills/s (~2200 w/Desktop Composition disabled)
PaintPicture (no Refresh): ~2000 fills/s (variable per instance ~1400-2100 w/Desktop Composition disabled)

I do not see any downside to the PaintPicture only method, but your mileage may vary.
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').

Last edited by Cerian Knight; 02-27-2017 at 12:52 PM.
Reply With Quote
  #22  
Old 03-04-2017, 07:57 PM
Mathimagics's Avatar
Mathimagics8-bit Bitmaps: How to tweak the Color Table Mathimagics is offline
Algorithms 'R' Us

Forum Leader
* Guru *
 
Join Date: Jun 2002
Location: Canberra
Posts: 4,159
Default

I'm a litle confused, what exactly is "SourceBMP"?

I thought PaintPicture required a Picture object ...
__________________
Cogito, ergo codo
Reply With Quote
  #23  
Old 03-05-2017, 06:34 PM
Cerian Knight's Avatar
Cerian Knight8-bit Bitmaps: How to tweak the Color Table Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,185
Default

Sorry, I should have called it SourcePic (or SourceDIB).

SourceBMP is a StdPic object holding the DIB Picture whose (hidden) surface I have DMA access to.

StdPic offers more potential than a PictureBox Loaded picture , since you can DMA to multiple StdPics and PaintPicture any one of them at will. Even with only one StdPic, I have found some performance benefit.
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').

Last edited by Cerian Knight; 03-05-2017 at 06:41 PM.
Reply With Quote
Reply

Tags
table, color, image, pixel, bitmap, array, imagebmp, 8-bit, pointer, change, pdib, tweak, bmp, repat, fly, reload, found, source, data, file, odd, pain, seamlessly, real, reasons


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
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table 8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
 
8-bit Bitmaps: How to tweak the Color Table
8-bit Bitmaps: How to tweak the Color Table
 
-->