How can i rotate image for some degrees?for example 37 degrees?
Version 1.1 posted with new method BitmapEx.Rotate which rotates a bitmap an arbitrary number of degrees. Note that it you want to merge the source for a device app you need to put a SIP(False) statement in your App_Start if you do not already use SIP else where. This forces the Basic4ppc to reference a .NET assembly that itf would not otherwise do and that is required for merging. This need will be removed with the next version of Basic4ppc.
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Hi agraham,
I tested the new features and especially ROTATE works very good and fast in steps of 90° (about 150 msec for an image with 240 x 240 pixels) on my HTC. But 90° is a little too much for “Course Up” with my moving map system. The maximum deviation is 45°. When I rotate the map with the raw heading it takes up to 1800 msec and this is too slow. Is it possible to optimize the rotation for steps of e.g. 30° or 45°. May be we can (you can) replace the trigonometric functions with a constant and this will be much faster??
BTW: Using ROTATE clock- and counterclockwise would be unbelievable!
__________________
Thanks for all
wolfgang
___________________
Desktop: Dual Core 3.0 GHz, Win7
Device: IPAQ 3970 WM 2003, Asus 632N WM5, HTC 3650 Cruise
GPS: iblue 747
replace the trigonometric functions with a constant
I already did. It was reasonably optimised before but now I have moved as much out of the main loop as I can. Try this modified library and post here how it goes. It may be a little improved but this is as fast as it is going to get in a .NET library unless I can think of a better algorithm - and I doubt that!
thank you. Can you please upload the cs files as well because I don't develop on the device.
Just copy ImageLibExDevice.dll to your device with your compiled app. I'll sort out cs files and help once I have determined what is going in the next release.
Hi,
first off all: congratulations!
Tested on HTC Cruise 3650 WM 6.0 Pro (Qualcomm® MSM7200™, 400MHz). Image size 240 x 240 pixels (bmp or gif doesn’t matter).
90°, 180° and 270° ~ 130 msec
5° ~ 400 msec
45° ~ 600 msec (45° is the slowest)
That’s very cloth to perfect. Now I have to optimize my code. Thanks’ again.
__________________
Thanks for all
wolfgang
___________________
Desktop: Dual Core 3.0 GHz, Win7
Device: IPAQ 3970 WM 2003, Asus 632N WM5, HTC 3650 Cruise
GPS: iblue 747
Flip is correct but Rotate 180 isn't. Sorry, bad attempt at optimisation . I'll soon release version 1.2 with this corrected, all the rotations slightly more optimised and a couple of other changes and additions.