Re: How can I draw faster than .NET graphics?



no change, still the same framerate...


"Michael C" <nospam@xxxxxxxxxx> wrote in message
news:ed$mFzFyGHA.4176@xxxxxxxxxxxxxxxxxxxxxxx
"ThunderMusic" <NoSpAmdanlatathotmaildotcom@xxxxxxxxxx> wrote in message
news:eWp2lgFyGHA.4732@xxxxxxxxxxxxxxxxxxxxxxx
as strange as it may look, converting my images to bmp made the fps go
from 4 fps to 6 fps... I just don't understand why it changes anything...
Does the framework load the file each time it draws?!?

No, it stores it as a bitmap no matter what the source but it does keep a
reference to the source and maybe reads it for certain things.

I load it once using new Bitmap(filename) into a member Bitmap
variable... so I don't see why it influences the performance of the
draw... I'd like to have a bit more performance tought... like I said
earlier, I'd like to have at least 10 fps assuming the target cpu is P3
1ghz and I'm testing on a P4 3Ghz...

Are you sure it's in Format32bppPArgb? If you load the bitmap from a file
I don't think it will be. You should load the bitmap as you are, create a
second bitmap of the same size but Format32bppPArgb, use the graphics
object to draw the first bitmap onto the second and then dispose the first
bitmap.

Michael



.



Relevant Pages

  • Re: VB3 is making my head spin!
    ... > and displaying it pixel by pixel] tell me how. ... compressed bitmap from an original 24 but full colour bitmap that is held on disk as a standard ... It shows you how to load a full colour 24bit .bmp file from disk and count ... Dim z As Long, t1 As Long, t2 As Long ...
    (comp.lang.basic.visual.misc)
  • Re: Loading image byte array
    ... Thanks Frank, I actually got it working myself before I saw your code. ... load the my image like Michael Phillips suggested. ... at that point Then create a Graphics using a fast-access second bitmap (we ... by pixel over to the byte array. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: ImageList: Is this possible?
    ... Now I want to load ... There's an API fiunction that lets you create a bitmap in memory: ... lpInfoHeader As BITMAPINFOHEADER, ByVal dwUsage As Long, lpInitBits As ...
    (microsoft.public.vb.general.discussion)
  • Re: Large image
    ... The problem there is just trying to load a 3000x3000 bitmap is very likely ... to run the device out of memory long before it's fully in memory. ... templates and full source code then you can buy the SDF Extensions ...
    (microsoft.public.dotnet.framework.compactframework)
  • Twain and Stream questions
    ... load it back from the file into my image control no problem. ... into/out of a stream. ... any ideas on how to load the bitmap directly ... internal static extern int GdipSaveImageToStream(IntPtr image, ...
    (microsoft.public.dotnet.languages.csharp)