The Compact Framework does not currently support image rotation. Nor will
GetHowFromImage() help.
However we do support degenerative rectangles for image blitting. So you
can actually achieve image rotation by simply doing
Graphics.DrawImage(image, destrect, srcrect, graphicsunit), and providing
negative coordinates for the deskrect. e.g. destrect = new Rectangle(100,
100, -100, -100) to get 180 degree rotation around 0,0. Or destRect = new
Rectangle(100, 0, -100, 100) to get a flip.
Hope that helps,
-Armin
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Romu" <romu@nospam>
| Sender: "Romu" <romu@nospam>
| References: <
[email protected]>
| Subject: How to rotate image?
| Date: Wed, 27 Aug 2003 00:15:05 -0700
| Lines: 31
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNsavC/yxk+WeCmR2qWZ3VxHSAwrQ==
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:32114
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| We are several people trying to implement image rotation
| and, from now, everybody failed.
|
| Saying "image rotation", I would say an efficient way to
| rotate images, because an unefficient way exists:
| GetPixel / SetPixel, but this is veeeerrrrryyyyyy slow.
|
| You can try my Pex (Picture Explorer) software to have an
| idea of rotation time. Go to
http://www.codeppc.com/dotnet
| and search Pex.
|
| I tried to implement rotation from the OpenNetCF article,
| but I failed as the new created bitmap is not created as
| a DIBSECTION I can't save it.
|
| >-----Original Message-----
| >How to rotate image in .net cf? I want to get the
| original
| >image's scan line, than create a new bitmap and get its
| >scan line and write to it directly.
| >
| >My question is how to get the scan line? And I also
| >wounder what is "GetHowFromImage"? The return of it
| seems
| >not to be a memory address of some structure, neither a
| >handle of hGdiObj. Would "GetHowFromImage" help me
| >rotating image?
| >
| >Thanx
| >.
| >
|