PC Review


Reply
Thread Tools Rate Thread

Direct access to CF image

 
 
Erik
Guest
Posts: n/a
 
      1st Oct 2005
Hi,

I'm new in CF.NET thus sorry in advance for my stupid question.

In .NET framework I used to work with the LockBits to get access to a
pointer of the first pixel but have found that this method does not
exist in CF space. How it can be?

By the way, I was trying to use SetPixels/GetPixels but found that this
method is really-really slow.

Any suggestions, thoughts, ideas to this topic?

Erik

 
Reply With Quote
 
 
 
 
Sergey Bogdanov
Guest
Posts: n/a
 
      1st Oct 2005
Hi,

First of all I recommend you to read Alex Feinman's article "Gaining
Access to the Graphic Object Internals in .NET Compact Framework" [1].

Once you got hMemoryDC/hBitmap variables of CF Bitmap (notice that CF
bitmap is Device Dependant Bitmap and may vary in different devices) you
can create Device-Independent Bitmap (DIB) with the same size. From DIB
bitmap you should get a pointer to bits section - use it for offscreen
drawing. At the end of drawing call BitBlt P/Invoke to copy a Bitmap
from offscreen to CF Bitmap Device Content (DC).

To summarize all these steps I have created for you a sample which
demonstrates how to rotate an image on 360-degree. [2]

PS:
The .NET Compact Framework version 2.0 provides support for the
LockBits method but Bitmap is still DDB.

[1]
http://www.opennetcf.org/PermaLink.a...5-a467a6293f0b
[2]
http://www.sergeybogdanov.com/Sample...reRotating.zip

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Erik wrote:
> Hi,
>
> I'm new in CF.NET thus sorry in advance for my stupid question.
>
> In .NET framework I used to work with the LockBits to get access to a
> pointer of the first pixel but have found that this method does not
> exist in CF space. How it can be?
>
> By the way, I was trying to use SetPixels/GetPixels but found that this
> method is really-really slow.
>
> Any suggestions, thoughts, ideas to this topic?
>
> Erik
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
For certain directories, protecting files from direct access that match a naming pattern OR mediating http access through my app Ken Fine Microsoft ASP .NET 1 31st Jul 2007 08:49 AM
Cannot access my ISP direct from outlook. have to access isp firs =?Utf-8?B?YWtib2IyNw==?= Microsoft Outlook BCM 0 20th Jan 2006 08:47 PM
Preventing direct access to tables in an Access .adp project =?Utf-8?B?dmlydHVhbGpheQ==?= Microsoft Access Security 0 2nd Jan 2005 08:15 PM
Changing image on Image control in Form running Access 2002 Runtime John Cosmas Microsoft Access 1 9th Feb 2004 03:00 PM
Drive Image 7 - first go at Image direct to DVD+RW is now a coaster after I cancelled - how can I erase the disc? Ian Roberts Storage Devices 0 30th Aug 2003 06:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:22 AM.