This is my Image Library for Device and Desktop. Short description follows.
Methods: ScreenCapture: Captures the whole screen. ScreenCapture2(x,y,width,Height): Captures part of the screen. ControlCapture(ControlName,x,y,width,Height): Captures part of a control. x,y are relatives to control upper left corner. The control can be a form or any other control SaveImageBMP(Image, FileName): Saves the Image as BMP to a file with filename Filename. SaveImageJPEG(Image, FileName): Saves the Image as JPG to a file with filename Filename. SaveImageGIF(Image, FileName): Saves the Image as GIF to a file with filename Filename. CopyImage(sourceImage, x,y,width, height): Copies a part of an image. Returns the new cropped Image (part of the source) RotateImage(sourceImage, angle): Rotates an image. Angle can be one of 0, 90, 180, 270. Returns the rotated Image ZoomImage(sourceImage, Percent): Zoomes an image Percent% of the original (Percent = 0 to 1000). Returns the Zoomed Image ImageSize(Image): Returns an array(2) containing width and height of the image. array(0) = width and array(1) = height
Properies: Image: The recently captured image
For how to use it see the included in the attached zip, test2.sbp
You continue amazing me !
Indispensable for astronomy applications that need to adjust star charts and
planet surface views to simulate different optical systems.
I guess the next version will include
1. MirrorUpDown
2. MirrorLeftRight
3. InvertImage
No, no, please, don't amaze me again
Happy Holidays!
Robert
Supplement:
I had some fun 'playing' with dzImage
No problems encountered, except for RotateImage angle = 0 blacks the form out,
but can be worked around by rotating the source of dr.Image 90 degs every time.
Can't play around any longer, today's my turn for cooking.
Yes Erel I forgot it. Requires .NET 2.0 (.NETCF 2.0 for the device)
Robert your wishes is an order for me.
New version with:
New Methods: FlipHorizontal(sourceImage): Flips Horizontal the image FlipVertical(sourceImage): Flips Vertical the image InvertImage(sourceImage): Inverts the colours of the image
Changed Property: Image: The Image property is not any more ReadOnly. You can also use it to store an Image
Your having way too much fun. Even though I haven't needed it yet, when I get there I'm problably going to. You make erel's already great program even greater along with a few other members of this forum.
Haisai Dimitris,
Agijabiyo, I was afraid you would do that.
The good thing about you is, you keep me away from the streets.
Fantastic, entirely new perspectives for image presentations.
It's nearly 2:00AM on this island. I will feed you back any findings, shortly,
if any.
Thanks so much!
Robert
hi Dimitris
Your library is expanding the capabilities of this software in steps too large for me ! its fantastic.
If I want to know the size of a jpg file which I display on a form using form.DrawIimage - how do I do it ? (the file size is bigger than the screen, lets say 1000X1000).
The Imagesize gives me the size of the screen and I need the size of the original image file.
If your library can work on the whole image - it will be very useful for my navigation program.
Maybe there is a way to know the properties of an image file even before drawing it on the form.
__________________
David Erez
Ramat Hasharon, Israel
You should load the big image somewhere. An ImageList, a hidden Image control, a hidden form or something. After that you can get it's size using dzImage.ImageSize.
Then you can draw the part of it you want using dzImage.CopyImage
Thank for the idea.
I could not resist and went directly to upgrade my navigation program - to enable the user to rotate the map.
Amazing - it was very easy, after you did all the work in the library.
I also managed to correct some aspect ratio problems
I attach pictures of the screen with the 4 rotation states.
I am very excited about it, thank you again
__________________
David Erez
Ramat Hasharon, Israel
Hello David,
The aspect is not a 'problem', it's a feature. You can use it for image
processing, in this very case, a blur effect. You set the blur factor
simply by the number of rotations using 90 or 270 degrees