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.How can i rotate image for some degrees?for example 37 degrees?
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!replace the trigonometric functions with a constant
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.thank you. Can you please upload the cs files as well because I don't develop on the device.
Flip is correct but Rotate 180 isn't. Sorry, bad attempt at optimisationFlip may be correct but not Rotate.
Wolfgang. Please check this interim version out before I finalise the next release. I have fixed the rotate and added a new rotate method, Rotate180.
You can't have speed and quality. I concentrated on speed in the original rotate. That meant calculating for each pixel in the rotated image the nearest pixel in the old image and copying that. In the inner loop of the algorithm, where most time is spent, when optimised that took two integer multiplications, two integer additions, two integer subtractions and three byte fetches and three byte stores, one for each colour.Please have a look at the quality of the rotated image.
You can't have speed and quality.
Whatever is happening is nothing to do with ImageLibEx as you are adding the image to an image control in the Designer which then loaded by Basic4ppc at runtime. You haven't included an image but if I put an image called Softselect.bmp in the app directory then run the program it loads fine for meHi Andrew
I think I found a bug?
When you want to add a image to a form
you select the file name, if it is in a different directory, it copies to you app folder and works fine.
But if the file is in the app directory it gives "An Error occured - error loadinig image"
but then again i may be doing someting stupid
Thanks
Friedrich
I am sorry but I don't understand what you mean by "reload as if ..." Whatever it is it is nothing to do with ImageLibEx.Yes, now reload as if you loaded the wrong image from the app directoryit seems to work the first time, but not there after.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?